com.vividsolutions.jump.io.datasource
Class DelegatingCompressedFileHandler
java.lang.Object
com.vividsolutions.jump.io.datasource.DelegatingCompressedFileHandler
- All Implemented Interfaces:
- JUMPReader
public class DelegatingCompressedFileHandler
- extends java.lang.Object
- implements JUMPReader
If the file is a .zip or .gz file, mangles the DriverProperties into the format
expected by many of the first JUMPReaders, which take responsibility
for doing the decompression. Really, JUMPReaders should not
have to be responsible for decompression -- they should be wrapped
by a CompressedFileHandler (not yet written) which would decompress the
data before handing it to the JUMPReader. Anyway, developers should now be
writing DataSources instead of JUMPReaders.
|
Method Summary |
protected void |
mangle(DriverProperties dp,
java.lang.String fileProperty,
java.lang.String compressedFileProperty,
java.util.Collection myEndings)
|
FeatureCollection |
read(DriverProperties dp)
Read the specified file using the filename given by the "File" property
and any other parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatingCompressedFileHandler
public DelegatingCompressedFileHandler(JUMPReader reader,
java.util.Collection endings)
- Constructs a DelegatingCompressedFileHandler that wraps a JUMPReader.
- Parameters:
endings - strings found at the ends of filenames, used to identify
the file to extract from a .zip; does not apply to .gz files
read
public FeatureCollection read(DriverProperties dp)
throws java.lang.Exception
- Description copied from interface:
JUMPReader
- Read the specified file using the filename given by the "File" property
and any other parameters.
- Specified by:
read in interface JUMPReader
- Parameters:
dp - only the "File" property is necessary; if it is a .zip or
.gz, the required "CompressedFile" property will be
determined automatically
- Throws:
java.lang.Exception
mangle
protected void mangle(DriverProperties dp,
java.lang.String fileProperty,
java.lang.String compressedFileProperty,
java.util.Collection myEndings)
throws java.lang.Exception
- Throws:
java.lang.Exception