| java.lang.Object java.io.InputStream org.apache.derby.iapi.services.io.ArrayInputStream
ArrayInputStream | final public class ArrayInputStream extends InputStream implements LimitObjectInput(Code) | | An InputStream that allows reading from an array of bytes. The array
of bytes that is read from can be changed without having to create a new
instance of this class.
|
ArrayInputStream | public ArrayInputStream()(Code) | | |
ArrayInputStream | public ArrayInputStream(byte[] data)(Code) | | |
ArrayInputStream | public ArrayInputStream(byte[] data, int offset, int length) throws IOException(Code) | | |
clearLimit | final public int clearLimit()(Code) | | Clears the limit by setting the limit to be the entire byte array.
See Also: Limit.clearLimit |
getData | public byte[] getData()(Code) | | Return a reference to the array of bytes this stream is going to read
from so that caller may load it with stuff
|
getPosition | public int getPosition()(Code) | | |
readCloudscapeUTF | final public int readCloudscapeUTF(char[][] rawData_array) throws IOException(Code) | | read in a cloudscape UTF formated string into a char[].
This routine inline's the code to read a UTF format string from a
byte[] array (pageData), into a char[] array. The string will
be read into the char[] array passed into this routine through
rawData_array[0] if it is big enough. If it is not big enough
a new char[] will be alocated and returned to the caller by putting
it into rawData_array[0].
To see detailed description of the cloudscape UTF format see
the writeExternal() routine of SQLChar.
The routine returns the number of char's read into the returned
char[], note that this length may smaller than the actual length
of the char[] array.
The the number of valid char's in the returned char[]. Parameters: rawData_array - This parameter uses a element array to implementan in/out function parameter. The char[] arrayin rawData_array[0] is used to read the data intounless it is not big enough, then a new arrayis allocated and the old one discarded. In either case on return rawData_array[0] containsthe filled in char[] - caller must allow thatthe array may or may not be different from theone passed in. exception: StandardException - Standard exception policy. |
readCompressedInt | final public int readCompressedInt() throws IOException(Code) | | Read a compressed int from the stream.
Read a compressed int from the stream, which is assumed to have
been written by a call to CompressNumber.writeInt().
Code from CompressedNumber is inlined here so that these fields can
be read from the array with a minimum of function calls.
The format of a compressed int is as follows:
Formats are (with x representing value bits):
1 Byte- 00xxxxxx val <= 63 (0x3f)
2 Byte- 01xxxxxx xxxxxxxx val > 63 && <= 16383 (0x3fff)
4 byte- 1xxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx val > 16383 && <= MAX_INT
exception: StandardException - Standard exception policy. |
readCompressedLong | final public long readCompressedLong() throws IOException(Code) | | Read a compressed long from the stream.
Read a compressed long from the stream, which is assumed to have
been written by a call to CompressNumber.writeLong().
Code from CompressedNumber is inlined here so that these fields can
be read from the array with a minimum of function calls.
The format of a compressed int is as follows:
Formats are (with x representing value bits):
value <= 16383 (0x3fff):
2 byte - 00xxxxxx xxxxxxxx
value > 16383 && <= 0x3fffffff:
4 byte - 01xxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
value > 0x3fffffff && <= MAX_LONG:
8 byte - 1xxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
|
readFully | final public void readFully(byte b, int off, int len) throws IOException(Code) | | |
setData | public void setData(byte[] data)(Code) | | Set the array of bytes to be read.
|
setData | public void setData(byte[] data, int offset, int length) throws IOException(Code) | | |
setLimit | public int setLimit(int offset, int length) throws IOException(Code) | | A setLimit which also sets the position to be offset.
exception: IOException - limit is out of range |
|
|