Interface Source

  • All Known Implementing Classes:
    FileSource, StringSource, 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 Detail

      • getInputStream

        java.io.InputStream getInputStream()
                                    throws java.io.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:
        java.io.IOException
      • getLocation

        java.lang.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.