org.brains2b.data.sql.lob
Class DisconnectedStream

java.lang.Object
  extended by org.brains2b.data.sql.lob.DisconnectedStream
All Implemented Interfaces:
org.brains2b.sql.meta.types.Stream

public class DisconnectedStream
extends java.lang.Object
implements org.brains2b.sql.meta.types.Stream

Implementation of Stream for database streams that are not connected to the stream in the database.

This implementation exists while some database (f.e. Oracle) will only allow access to the stream from the exact position within a ResultSet

This method is the simplest way to keep this stream by using LobCache as store the current content of the stream. This is not an ideal solution. It would be better to keep a cursor inside this stream, but this would require information on the unique identifiers of a record to retrieve the stream when requested

Version:
0.90 [21-03-2008]
Author:
dennis@brains2b.nl

Constructor Summary
DisconnectedStream()
           
DisconnectedStream(java.io.InputStream is)
           
 
Method Summary
 java.io.InputStream getInputStream()
           
 java.io.OutputStream getOutputStream()
           
 int hashCode()
           
 boolean isAccessed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisconnectedStream

public DisconnectedStream()

DisconnectedStream

public DisconnectedStream(java.io.InputStream is)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.sql.SQLException
Specified by:
getInputStream in interface org.brains2b.sql.meta.types.Stream
Throws:
java.sql.SQLException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.sql.SQLException
Specified by:
getOutputStream in interface org.brains2b.sql.meta.types.Stream
Throws:
java.sql.SQLException

isAccessed

public boolean isAccessed()
                   throws java.sql.SQLException
Specified by:
isAccessed in interface org.brains2b.sql.meta.types.Stream
Throws:
java.sql.SQLException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object