Daisy Open Source CMS

org.outerj.daisy.repository
Class ByteArrayPartDataSource

java.lang.Object
  extended by org.outerj.daisy.repository.ByteArrayPartDataSource
All Implemented Interfaces:
PartDataSource

public final class ByteArrayPartDataSource
extends Object
implements PartDataSource

An implementation of the PartDataSource interface that takes its input from a byte array. Provided for your convenience.


Constructor Summary
ByteArrayPartDataSource(byte[] data)
           
 
Method Summary
 InputStream createInputStream()
          This method may be called multiple times.
 long getSize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayPartDataSource

public ByteArrayPartDataSource(byte[] data)
Method Detail

createInputStream

public InputStream createInputStream()
                              throws IOException
Description copied from interface: PartDataSource
This method may be called multiple times.

Specified by:
createInputStream in interface PartDataSource
Throws:
IOException

getSize

public long getSize()
Specified by:
getSize in interface PartDataSource

Daisy Open Source CMS