Package com.powsybl.commons.datasource
Class ResourceDataSource
- java.lang.Object
-
- com.powsybl.commons.datasource.ResourceDataSource
-
- All Implemented Interfaces:
ReadOnlyDataSource
public class ResourceDataSource extends Object implements ReadOnlyDataSource
- Author:
- Geoffroy Jamgotchian
-
-
Constructor Summary
Constructors Constructor Description ResourceDataSource(String baseName, ResourceSet... resourceSets)
ResourceDataSource(String baseName, List<ResourceSet> resourceSets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists(String fileName)
boolean
exists(String suffix, String ext)
String
getBaseName()
Set<String>
listNames(String regex)
InputStream
newInputStream(String fileName)
InputStream
newInputStream(String suffix, String ext)
-
-
-
Constructor Detail
-
ResourceDataSource
public ResourceDataSource(String baseName, ResourceSet... resourceSets)
-
ResourceDataSource
public ResourceDataSource(String baseName, List<ResourceSet> resourceSets)
-
-
Method Detail
-
getBaseName
public String getBaseName()
- Specified by:
getBaseName
in interfaceReadOnlyDataSource
-
exists
public boolean exists(String suffix, String ext)
- Specified by:
exists
in interfaceReadOnlyDataSource
-
exists
public boolean exists(String fileName)
- Specified by:
exists
in interfaceReadOnlyDataSource
-
newInputStream
public InputStream newInputStream(String suffix, String ext)
- Specified by:
newInputStream
in interfaceReadOnlyDataSource
-
newInputStream
public InputStream newInputStream(String fileName)
- Specified by:
newInputStream
in interfaceReadOnlyDataSource
-
listNames
public Set<String> listNames(String regex)
- Specified by:
listNames
in interfaceReadOnlyDataSource
-
-