Package com.powsybl.commons.datasource
Class FileDataSource
java.lang.Object
com.powsybl.commons.datasource.FileDataSource
- All Implemented Interfaces:
DataSource
,ReadOnlyDataSource
- Direct Known Subclasses:
Bzip2FileDataSource
,GzFileDataSource
,XZFileDataSource
,ZstdFileDataSource
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Constructor Summary
ConstructorDescriptionFileDataSource
(Path directory, String baseName) FileDataSource
(Path directory, String baseName, DataSourceObserver observer) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
protected InputStream
protected OutputStream
protected String
newInputStream
(String fileName) newInputStream
(String suffix, String ext) newOutputStream
(String fileName, boolean append) newOutputStream
(String suffix, String ext, boolean append)
-
Constructor Details
-
FileDataSource
-
FileDataSource
-
-
Method Details
-
getBaseName
- Specified by:
getBaseName
in interfaceReadOnlyDataSource
-
getCompressionExt
-
getCompressedInputStream
- Throws:
IOException
-
getCompressedOutputStream
- Throws:
IOException
-
newOutputStream
- Specified by:
newOutputStream
in interfaceDataSource
- Throws:
IOException
-
newOutputStream
- Specified by:
newOutputStream
in interfaceDataSource
- Throws:
IOException
-
exists
- Specified by:
exists
in interfaceReadOnlyDataSource
- Throws:
IOException
-
exists
- Specified by:
exists
in interfaceReadOnlyDataSource
- Throws:
IOException
-
newInputStream
- Specified by:
newInputStream
in interfaceReadOnlyDataSource
- Throws:
IOException
-
newInputStream
- Specified by:
newInputStream
in interfaceReadOnlyDataSource
- Throws:
IOException
-
listNames
- Specified by:
listNames
in interfaceReadOnlyDataSource
- Throws:
IOException
-