Package org.apache.any23.source
Class ByteArrayDocumentSource
- java.lang.Object
-
- org.apache.any23.source.ByteArrayDocumentSource
-
- All Implemented Interfaces:
org.apache.any23.source.DocumentSource
public class ByteArrayDocumentSource extends Object implements org.apache.any23.source.DocumentSource
ByteArray implementation ofDocumentSource
.- Author:
- Richard Cyganiak (richard@cyganiak.de)
-
-
Constructor Summary
Constructors Constructor Description ByteArrayDocumentSource(byte[] bytes, String documentIRI, String contentType)
ByteArrayDocumentSource(InputStream inputStream, String documentIRI, String contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getContentLength()
String
getContentType()
String
getDocumentIRI()
boolean
isLocal()
InputStream
openInputStream()
-
-
-
Constructor Detail
-
ByteArrayDocumentSource
public ByteArrayDocumentSource(byte[] bytes, String documentIRI, String contentType)
-
ByteArrayDocumentSource
public ByteArrayDocumentSource(InputStream inputStream, String documentIRI, String contentType) throws IOException
- Throws:
IOException
-
-
Method Detail
-
openInputStream
public InputStream openInputStream() throws IOException
- Specified by:
openInputStream
in interfaceorg.apache.any23.source.DocumentSource
- Throws:
IOException
-
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interfaceorg.apache.any23.source.DocumentSource
-
getDocumentIRI
public String getDocumentIRI()
- Specified by:
getDocumentIRI
in interfaceorg.apache.any23.source.DocumentSource
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceorg.apache.any23.source.DocumentSource
-
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interfaceorg.apache.any23.source.DocumentSource
-
-