Interface DataSourceProvider.DataSourceFactory

Enclosing interface:
DataSourceProvider

@ExperimentalApi public static interface DataSourceProvider.DataSourceFactory
Creates DataSource objects from various underlying sources.
Since:
5.0.0
  • Method Details

    • ofInputStream

      @ExperimentalApi default DataSource ofInputStream(InputStream inputStream)
      Creates a data source for the given inputStream.
      Parameters:
      inputStream - the input stream of the data file
      Returns:
      a data source for the given input stream
      Since:
      5.0.0
    • ofFile

      @ExperimentalApi default DataSource ofFile(Path path)
      Creates a data source for the given path.
      Parameters:
      path - the path of the data file
      Returns:
      a data source for the given path
      Since:
      5.0.0
    • ofResource

      @ExperimentalApi default DataSource ofResource(String name)
      Creates a data source for the given resource name.
      Parameters:
      name - the name of the resource containing the data.
      Returns:
      a data source for the given resource name
      Since:
      5.0.0
    • ofString

      @ExperimentalApi default DataSource ofString(String data)
      Creates a data source from the given data string.
      Parameters:
      data - the data represented as a string
      Returns:
      a data source for the data string
      Since:
      5.0.0