org.apache.any23.source
Class MemCopyFactory

java.lang.Object
  extended by org.apache.any23.source.MemCopyFactory
All Implemented Interfaces:
LocalCopyFactory

public class MemCopyFactory
extends Object
implements LocalCopyFactory

Creates local copies of DocumentSource 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
MemCopyFactory()
           
 
Method Summary
 DocumentSource createLocalCopy(DocumentSource in)
           
static byte[] toByteArray(InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemCopyFactory

public MemCopyFactory()
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 interface LocalCopyFactory
Throws:
IOException


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.