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 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

    Constructors
    Constructor | Description
    --- | ---
    `MemCopyFactory()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.apache.any23.source.DocumentSource` | `createLocalCopy​(org.apache.any23.source.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 org.apache.any23.source.DocumentSource createLocalCopy​(org.apache.any23.source.DocumentSource in)
                                                                 throws IOException

      Specified by:
        `createLocalCopy` in interface `LocalCopyFactory`
      Throws:
        `IOException`