| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private ErrorObjectInput | |
| private byte[] | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ArrayInputStream(byte[]
The data in the stream data)Create an ArrayInputStream with the passed in data. |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Implements java. Returns the number of bytes that can be read without blocking. |
| public final int | clearLimit()
Implements org. Clears the limit by setting the limit to be the entire byte array. |
| public byte[] | Returns: the data in the streamReturn a reference to the array of bytes this stream is going to read from so that caller may load it with stuff |
| public String | |
| public Exception | |
| public int | |
| public int | read()
Implements abstract java. Implements java. Reads a byte of data. |
| public int | read(byte[]
the buffer into which the data is read b, int the start offset of the data off, int the maximum number of bytes read len)Overrides java. Implements java. Reads into an array of bytes. |
| public final boolean | readBoolean()
Implements java. Reads one input byte and returns
|
| public final byte | |
| public final char | |
| public final int | |
| public final long | |
| public final int | Returns: The the number of valid char's in the returned char[].This parameter uses a element array to implement
an in/out function parameter. The char[] array
in rawData_array[0] is used to read the data into
unless it is not big enough, then a new array
is allocated and the old one discarded. In
either case on return rawData_array[0] contains
the filled in char[] - caller must allow that
the array may or may not be different from the
one passed in. rawData_array, int the byte length of the value, or utflen)0 if unknownread in a Derby UTF formated string into a char[]. |
| public final double | readDouble()
Implements java. Reads eight input bytes and returns
a |
| public final float | readFloat()
Implements java. Reads four input bytes and returns
a |
| public final void | readFully(byte[]
the buffer into which the data is read. b)Implements java. Reads some bytes from an input
stream and stores them into the buffer
array |
| public final void | readFully(byte[]
the buffer into which the data is read. b, int an int specifying the offset in the data array off, int b.an int specifying the number of bytes to read. len)Implements java. Reads |
| public final int | |
| public final String | |
| public final long | |
| public Object | |
| public final short | |
| public final int | readUnsignedByte()
Implements java. Reads one input byte, zero-extends
it to type |
| public final int | readUnsignedShort()
Implements java. Reads two input bytes and returns
an |
| public final String | readUTF()
Implements java. Reads in a string that has been encoded using a modified UTF-8 format. |
| public void | |
| public void | setLimit(int
Offset into the stream offset, int New length length)A setLimit which also sets the position to be offset. |
| public final void | setLimit(int
The length to set length)Implements org. Set the limit of the data that can be read or written. |
| public final void | |
| public long | Returns: the number of bytes that were skippedthe number of bytes to skip count)Overrides java. Implements java. Skip as many bytes as possible, but no more than |
| public final int | Returns: the number of bytes that were skippedthe number of bytes to skip n)Implements java. Skip as many bytes as possible, but no more than |
| end | back to summary |
|---|---|
| private int end | |
| oi | back to summary |
|---|---|
| private ErrorObjectInput oi | |
| pageData | back to summary |
|---|---|
| private byte[] pageData | |
| position | back to summary |
|---|---|
| private int position | |
| start | back to summary |
|---|---|
| private int start | |
| ArrayInputStream | back to summary |
|---|---|
| public ArrayInputStream() Create an ArrayInputStream with a zero length byte array. The position is set to 0 and the limit is the entire byte array. | |
| ArrayInputStream | back to summary |
|---|---|
| public ArrayInputStream(byte[] data) Create an ArrayInputStream with the passed in data. The position is set to 0 and the limit is the entire byte array.
| |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Implements java. Doc from java. Returns the number of bytes that can be read without blocking.
| |
| clearLimit | back to summary |
|---|---|
| public final int clearLimit() Implements org. Clears the limit by setting the limit to be the entire byte array.
| |
| getData | back to summary |
|---|---|
| public byte[] getData() Return a reference to the array of bytes this stream is going to read from so that caller may load it with stuff
| |
| getErrorInfo | back to summary |
|---|---|
| public String getErrorInfo() Implements org. | |
| getNestedException | back to summary |
|---|---|
| public Exception getNestedException() Implements org. | |
| getPosition | back to summary |
|---|---|
| public int getPosition() | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Implements java. Doc from java. Reads a byte of data. This method will block if no input is available.
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Implements java. Doc from java. Reads into an array of bytes. This method will block until some input is available.
| |
| readBoolean | back to summary |
|---|---|
| public final boolean readBoolean() throws IOException Implements java. Doc from java. Reads one input byte and returns
| |
| readByte | back to summary |
|---|---|
| public final byte readByte() throws IOException Implements java. Doc from java. Reads and returns one input byte.
The byte is treated as a signed value in
the range
| |
| readChar | back to summary |
|---|---|
| public final char readChar() throws IOException Implements java. Doc from java. Reads two input bytes and returns a
This method
is suitable for reading bytes written by
the writeChar method of interface
DataOutput.
| |
| readCompressedInt | back to summary |
|---|---|
| public final int readCompressedInt() throws IOException 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
| |
| readCompressedLong | back to summary |
|---|---|
| public final long readCompressedLong() throws IOException 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
| |
| readDerbyUTF | back to summary |
|---|---|
| public final int readDerbyUTF(char[][] rawData_array, int utflen) throws IOException read in a Derby 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 Derby 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 stream must be positioned on the first user byte when this method is invoked.
| |
| readDouble | back to summary |
|---|---|
| public final double readDouble() throws IOException Implements java. Doc from java. Reads eight input bytes and returns
a
| |
| readFloat | back to summary |
|---|---|
| public final float readFloat() throws IOException Implements java. Doc from java. Reads four input bytes and returns
a
| |
| readFully | back to summary |
|---|---|
| public final void readFully(byte[] b) throws IOException Implements java. Doc from java. Reads some bytes from an input
stream and stores them into the buffer
array This method blocks until one of the following conditions occurs:
If
| |
| readFully | back to summary |
|---|---|
| public final void readFully(byte[] b, int off, int len) throws IOException Implements java. Doc from java. Reads This method blocks until one of the following conditions occurs:
If
| |
| readInt | back to summary |
|---|---|
| public final int readInt() throws IOException Implements java. Doc from java. Reads four input bytes and returns an
This method is suitable
for reading bytes written by the writeInt
method of interface DataOutput.
| |
| readLine | back to summary |
|---|---|
| public final String readLine() throws IOException Implements java. Doc from java. Reads the next line of text from the input stream.
It reads successive bytes, converting
each byte separately into a character,
until it encounters a line terminator or
end of
file; the characters read are then
returned as a
If end of file is encountered
before even one byte can be read, then
| |
| readLong | back to summary |
|---|---|
| public final long readLong() throws IOException Implements java. Doc from java. Reads eight input bytes and returns
a
This method is suitable
for reading bytes written by the
| |
| readObject | back to summary |
|---|---|
| public Object readObject() throws ClassNotFoundException, IOException Implements java. Doc from java. Read and return an object. The class that implements this interface defines where the object is "read" from.
| |
| readShort | back to summary |
|---|---|
| public final short readShort() throws IOException Implements java. Doc from java. Reads two input bytes and returns
a
This method
is suitable for reading the bytes written
by the writeShort method of
interface DataOutput.
| |
| readUnsignedByte | back to summary |
|---|---|
| public final int readUnsignedByte() throws IOException Implements java. Doc from java. Reads one input byte, zero-extends
it to type
| |
| readUnsignedShort | back to summary |
|---|---|
| public final int readUnsignedShort() throws IOException Implements java. Doc from java. Reads two input bytes and returns
an
This method is suitable for reading the bytes
written by the writeShort method
of interface DataOutput if
the argument to writeShort
was intended to be a value in the range
0 through 65535.
| |
| readUTF | back to summary |
|---|---|
| public final String readUTF() throws IOException Implements java. Doc from java. Reads in a string that has been encoded using a
modified UTF-8
format.
The general contract of
First, two bytes are read and used to
construct an unsigned 16-bit integer in
exactly the manner of the
If the first byte of a group
matches the bit pattern
If the first byte
of a group matches the bit pattern
If the first byte of a group
matches the bit pattern 1110xxxx,
then the group consists of that byte a
and two more bytes b and c.
If there is no byte c (because
byte a was one of the last
two of the bytes to be read), or either
byte b or byte c
does not match the bit pattern 10xxxxxx,
then a UTFDataFormatException
is thrown. Otherwise, the group is converted
to the character:
If the first byte of a group matches the
pattern 1111xxxx or the pattern
10xxxxxx, then a UTFDataFormatException
is thrown.
If end of file is encountered
at any time during this entire process,
then an
After every group has been converted to
a character by this process, the characters
are gathered, in the same order in which
their corresponding groups were read from
the input stream, to form a
The
| |
| setData | back to summary |
|---|---|
| public void setData(byte[] data) Set the array of bytes to be read. Position is set to zero.
| |
| setLimit | back to summary |
|---|---|
| public void setLimit(int offset, int length) throws IOException A setLimit which also sets the position to be offset.
| |
| setLimit | back to summary |
|---|---|
| public final void setLimit(int length) throws IOException Implements org. Doc from org. Set the limit of the data that can be read or written. After this call up to and including length bytes can be read from or skipped in the stream. On input classes (e.g. InputStreams) any attempt to read or skip beyond the limit will result in an end of file indication (e.g. read() methods returning -1 or throwing EOFException). On output classes (e.g. OutputStream) any attempt to write more beyond the limit will result in an EOFException
| |
| setPosition | back to summary |
|---|---|
| public final void setPosition(int newPosition) throws IOException | |
| skip | back to summary |
|---|---|
| public long skip(long count) throws IOException Overrides java. Implements java. Skip as many bytes as possible, but no more than
| |
| skipBytes | back to summary |
|---|---|
| public final int skipBytes(int n) throws IOException Implements java. Skip as many bytes as possible, but no more than
| |