org.gcube.contentmanagement.baselayer.rdbmsImpl
Class BlobStream

java.lang.Object
  extended by org.gcube.contentmanagement.baselayer.BaseLayerStream
      extended by org.gcube.contentmanagement.baselayer.rdbmsImpl.BlobStream

public class BlobStream
extends BaseLayerStream

This class implements a wrapper to access Blob fields as input streams with known size.


Field Summary
 
Fields inherited from class org.gcube.contentmanagement.baselayer.BaseLayerStream
END_OF_STREAM, NO_LIMIT, STREAM_LENGTH_IMPLICITE, URL_CONNECTION_LENGTH_UNKNOWN
 
Constructor Summary
BlobStream(java.sql.Blob blob, java.sql.Connection connection)
          Creates new BlobStream
 
Method Summary
 void dispose()
          Closes the BaseLayerStream which implies that all bound resources should be freed.
 
Methods inherited from class org.gcube.contentmanagement.baselayer.BaseLayerStream
getBufferedStream, getBufferSize, getDefaultBufferSize, getLength, getLimit, getStream, handleStartOffset, hasImpliciteLength, isBuffered, needsLimitTreatment, setBuffered, setBufferSize, setDefaultBufferSize, setLimit, setLimit, toFixedLengthStream, writeToStreamRespectingLimit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobStream

public BlobStream(java.sql.Blob blob,
                  java.sql.Connection connection)
           throws BaseLayerException
Creates new BlobStream

Parameters:
blob - the database BLOB
connection - the connection to access the BLOB
Throws:
BaseLayerException - if something goes wrong
Method Detail

dispose

public void dispose()
             throws BaseLayerException
Closes the BaseLayerStream which implies that all bound resources should be freed.

Overrides:
dispose in class BaseLayerStream
Throws:
BaseLayerException - if something goes wrong