Interface Source

All Known Subinterfaces:
ModelSource, ModelSource2, SettingsSource
All Known Implementing Classes:
ArtifactModelSource, FileModelSource, FileSettingsSource, FileSource, StringModelSource, StringSettingsSource, StringSource, UrlModelSource, UrlSettingsSource, UrlSource

public interface Source
Provides access to the contents of a source independently of the backing store (e.g. file system, database, memory).
Author:
Benjamin Bentmann
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets a byte stream to the source contents.
    Provides a user-friendly hint about the location of the source.
  • Method Details

    • getInputStream

      InputStream getInputStream() throws IOException
      Gets a byte stream to the source contents. Closing the returned stream is the responsibility of the caller.
      Returns:
      A byte stream to the source contents, never null.
      Throws:
      IOException - in case of IO issue
    • getLocation

      String getLocation()
      Provides a user-friendly hint about the location of the source. This could be a local file path, a URI or just an empty string. The intention is to assist users during error reporting.
      Returns:
      A user-friendly hint about the location of the source, never null.