com.metamatrix.common.lob
Class ByteLobChunkStream

java.lang.Object
  extended by com.metamatrix.common.lob.ByteLobChunkStream
All Implemented Interfaces:
LobChunkProducer

public class ByteLobChunkStream
extends java.lang.Object
implements LobChunkProducer

A wrapper class, given a InputStream object can convert a underlying stream into sequence of ByteLobChunk objects of given chunk size. Opposite of the ByteLobChunkInputStream.

See Also:
ByteLobChunkInputStream

Constructor Summary
ByteLobChunkStream(java.io.InputStream stream, int chunkSize)
           
 
Method Summary
 void close()
          Close the underlaying stream of producing the chunks
 LobChunk getNextChunk()
          Gets the next LobChunk from the source, based on the chunk size configured
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteLobChunkStream

public ByteLobChunkStream(java.io.InputStream stream,
                          int chunkSize)
Method Detail

getNextChunk

public LobChunk getNextChunk()
                      throws java.io.IOException
Description copied from interface: LobChunkProducer
Gets the next LobChunk from the source, based on the chunk size configured

Specified by:
getNextChunk in interface LobChunkProducer
Returns:
LobChunk at position in the streamble object.
Throws:
java.io.IOException
See Also:
com.metamatrix.common.lob.ByteLobChunkProducer#getNextChunk(int)

close

public void close()
           throws java.io.IOException
Description copied from interface: LobChunkProducer
Close the underlaying stream of producing the chunks

Specified by:
close in interface LobChunkProducer
Throws:
java.io.IOException
See Also:
com.metamatrix.common.lob.ByteLobChunkProducer#close()


Copyright © 2009. All Rights Reserved.