Package org.apache.any23.source
Class MemCopyFactory
- java.lang.Object
-
- org.apache.any23.source.MemCopyFactory
-
- All Implemented Interfaces:
LocalCopyFactory
public class MemCopyFactory extends Object implements LocalCopyFactory
Creates local copies ofDocumentSource
by reading them into an in-memory buffer. This allows opening several input streams over the content at lower cost.- Author:
- Richard Cyganiak (richard@cyganiak.de)
-
-
Constructor Summary
Constructors Constructor Description MemCopyFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentSource
createLocalCopy(DocumentSource in)
static byte[]
toByteArray(InputStream in)
-
-
-
Method Detail
-
toByteArray
public static byte[] toByteArray(InputStream in) throws IOException
- Throws:
IOException
-
createLocalCopy
public DocumentSource createLocalCopy(DocumentSource in) throws IOException
- Specified by:
createLocalCopy
in interfaceLocalCopyFactory
- Throws:
IOException
-
-