Class ByteArrayDocumentSource

  • All Implemented Interfaces:
    org.apache.any23.source.DocumentSource

    public class ByteArrayDocumentSource
    extends Object
    implements org.apache.any23.source.DocumentSource
    ByteArray implementation of DocumentSource.
    Author:
    Richard Cyganiak (richard@cyganiak.de)
    • Constructor Detail

      • ByteArrayDocumentSource

        public ByteArrayDocumentSource​(byte[] bytes,
                                       String documentIRI,
                                       String contentType)
    • Method Detail

      • openInputStream

        public InputStream openInputStream()
                                    throws IOException
        Specified by:
        openInputStream in interface org.apache.any23.source.DocumentSource
        Throws:
        IOException
      • getContentLength

        public long getContentLength()
        Specified by:
        getContentLength in interface org.apache.any23.source.DocumentSource
      • getDocumentIRI

        public String getDocumentIRI()
        Specified by:
        getDocumentIRI in interface org.apache.any23.source.DocumentSource
      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface org.apache.any23.source.DocumentSource
      • isLocal

        public boolean isLocal()
        Specified by:
        isLocal in interface org.apache.any23.source.DocumentSource