org.apache.derby.impl.drda
Class EXTDTAInputStream
java.lang.Object
java.io.InputStream
org.apache.derby.impl.drda.EXTDTAInputStream
- public class EXTDTAInputStream
- extends java.io.InputStream
- Author:
- marsden
EXTDTAObjectHolder provides Externalized Large Object representation that
does not hold locks until the end of the transaction (DERBY-255)
It serves as a holder for lob data and is only valid as long as the original
result set from which it came is on the same row.
Fields inherited from class java.io.InputStream |
|
Constructor Summary |
private |
EXTDTAInputStream(int dataLength,
java.io.InputStream binaryInputStream)
|
Method Summary |
int |
available()
|
void |
close()
|
boolean |
equals(java.lang.Object arg0)
|
static EXTDTAInputStream |
getEXTDTAStream(java.sql.ResultSet rs,
int column,
int drdaType)
Retrieve stream from the ResultSet and column specified. |
private static long |
getInputStreamLength(java.io.InputStream binaryInputStream)
Get the length of the InputStream
This method is currently not used because there seems to be no way to
reset the she stream. |
int |
hashCode()
|
long |
length()
Return the length of the binary stream which was calculated when
EXTDTAObject was created. |
void |
mark(int arg0)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] arg0)
|
int |
read(byte[] arg0,
int arg1,
int arg2)
|
void |
reset()
|
long |
skip(long arg0)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
dataLength
long dataLength
binaryInputStream
java.io.InputStream binaryInputStream
columnNumber
int columnNumber
dataResultSet
java.sql.ResultSet dataResultSet
EXTDTAInputStream
private EXTDTAInputStream(int dataLength,
java.io.InputStream binaryInputStream)
- Parameters:
dataLength
- binaryInputStream
-
getEXTDTAStream
public static EXTDTAInputStream getEXTDTAStream(java.sql.ResultSet rs,
int column,
int drdaType)
throws java.sql.SQLException
- Retrieve stream from the ResultSet and column specified. Create an
input stream and length for the large object being retrieved. Do not hold
locks until end of transaction. DERBY-255.
- Parameters:
rs
- result set from which to retrieve the lobcolumn
- column numberdrdaType
- FD:OCA type of object one of
FdocaConstants.DRDA_TYPE_NLOBBYTES
FdocaConstants.DRDA_TYPE_LOBBYTES
FdocaConstants.DRDA_TYPE_NLOBCMIXED
FdocaConstants.DRDA_TYPE_LOBCMIXED
- Throws:
java.sql.SQLException
- See Also:
DDMWriter.writeScalarStream
getInputStreamLength
private static long getInputStreamLength(java.io.InputStream binaryInputStream)
throws java.sql.SQLException
- Get the length of the InputStream
This method is currently not used because there seems to be no way to
reset the she stream.
- Parameters:
binaryInputStream
- an InputStream whose length needs to be calclulated
- Returns:
- length of stream
- Throws:
java.sql.SQLException
length
public long length()
throws java.sql.SQLException
- Return the length of the binary stream which was calculated when
EXTDTAObject was created.
- Returns:
- the length of the stream once converted to an InputStream
- Throws:
java.sql.SQLException
read
public int read()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.read()
available
public int available()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.available()
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.close()
equals
public boolean equals(java.lang.Object arg0)
- See Also:
Object.equals(java.lang.Object)
hashCode
public int hashCode()
- See Also:
Object.hashCode()
mark
public void mark(int arg0)
- See Also:
InputStream.mark(int)
markSupported
public boolean markSupported()
- See Also:
InputStream.markSupported()
read
public int read(byte[] arg0)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.read(byte[])
read
public int read(byte[] arg0,
int arg1,
int arg2)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.read(byte[], int, int)
reset
public void reset()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.reset()
skip
public long skip(long arg0)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.skip(long)
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.