org.apache.derby.impl.jdbc
Class RawToBinaryFormatStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.derby.iapi.services.io.LimitInputStream
org.apache.derby.impl.jdbc.RawToBinaryFormatStream
- All Implemented Interfaces:
- Limit
- class RawToBinaryFormatStream
- extends LimitInputStream
Stream that takes a raw input stream and converts it
to the format of the binary types by prepending the
length of the value. In this case 0 is always written.
Fields inherited from class java.io.FilterInputStream |
in |
Fields inherited from class java.io.InputStream |
|
Method Summary |
private void |
checkSufficientData()
JDBC 3.0 (from tutorial book) requires that an
input stream has the correct number of bytes in
the stream. |
int |
read()
Read from the wrapped stream prepending the intial bytes if needed. |
int |
read(byte[] b,
int off,
int len)
Read from the wrapped stream prepending the intial bytes if needed. |
Methods inherited from class java.io.FilterInputStream |
close, mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dummyBytes
private int dummyBytes
RawToBinaryFormatStream
RawToBinaryFormatStream(java.io.InputStream in,
int length)
- Parameters:
in
- Application's raw binary stream passed into JDBC layerlength
- - length of the stream, if known, otherwise -1.
read
public int read()
throws java.io.IOException
- Read from the wrapped stream prepending the intial bytes if needed.
- Overrides:
read
in class LimitInputStream
- Throws:
java.io.IOException
checkSufficientData
private void checkSufficientData()
throws java.io.IOException
- JDBC 3.0 (from tutorial book) requires that an
input stream has the correct number of bytes in
the stream.
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Read from the wrapped stream prepending the intial bytes if needed.
- Overrides:
read
in class LimitInputStream
- Throws:
java.io.IOException
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.