Class DelegatingCompressedFileHandler
- java.lang.Object
-
- org.locationtech.jts.jump.io.datasource.DelegatingCompressedFileHandler
-
- All Implemented Interfaces:
JUMPReader
public class DelegatingCompressedFileHandler extends 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.
-
-
Constructor Summary
Constructors Constructor Description DelegatingCompressedFileHandler(JUMPReader reader, Collection endings)
Constructs a DelegatingCompressedFileHandler that wraps a JUMPReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
mangle(DriverProperties dp, String fileProperty, String compressedFileProperty, Collection myEndings)
FeatureCollection
read(DriverProperties dp)
Read the specified file using the filename given by the "File" property and any other parameters.
-
-
-
Constructor Detail
-
DelegatingCompressedFileHandler
public DelegatingCompressedFileHandler(JUMPReader reader, 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
-
-
Method Detail
-
read
public FeatureCollection read(DriverProperties dp) throws 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 interfaceJUMPReader
- Parameters:
dp
- only the "File" property is necessary; if it is a .zip or .gz, the required "CompressedFile" property will be determined automatically- Throws:
Exception
-
mangle
protected void mangle(DriverProperties dp, String fileProperty, String compressedFileProperty, Collection myEndings) throws Exception
- Throws:
Exception
-
-