Package org.instancio.feed
Interface DataSourceProvider.DataSourceFactory
- Enclosing interface:
DataSourceProvider
Creates
DataSource objects from various underlying sources.- Since:
- 5.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault DataSourceCreates a data source for the givenpath.default DataSourceofInputStream(InputStream inputStream) Creates a data source for the giveninputStream.default DataSourceofResource(String name) Creates a data source for the given resourcename.default DataSourceCreates a data source from the givendatastring.
-
Method Details
-
ofInputStream
Creates a data source for the giveninputStream.- Parameters:
inputStream- the input stream of the data file- Returns:
- a data source for the given input stream
- Since:
- 5.0.0
-
ofFile
Creates a data source for the givenpath.- Parameters:
path- the path of the data file- Returns:
- a data source for the given path
- Since:
- 5.0.0
-
ofResource
Creates a data source for the given resourcename.- Parameters:
name- the name of the resource containing the data.- Returns:
- a data source for the given resource name
- Since:
- 5.0.0
-
ofString
Creates a data source from the givendatastring.- Parameters:
data- the data represented as a string- Returns:
- a data source for the data string
- Since:
- 5.0.0
-