Class BufferDecoder
java.lang.Object
nom.tam.util.BufferDecoder
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcheckBuffer(int needBytes) This should only be used when a small number of bytes is required (substantially smaller than bufferSize.protected abstract inteofCheck(EOFException e, int start, int index, int length) protected intread(boolean[] b, int start, int length) protected intread(byte[] buf, int offset, int len) protected intread(char[] c, int start, int length) protected intread(double[] d, int start, int length) protected intread(float[] f, int start, int length) protected intread(int[] i, int start, int length) protected intread(long[] l, int start, int length) protected intread(short[] s, int start, int length) protected booleanprotected charreadChar()protected doubleprotected floatprotected voidreadFully(byte[] b, int off, int len) protected intreadInt()protected longreadLArray(Object o) protected longreadLong()protected shortprivate intprivate int
-
Field Details
-
Constructor Details
-
BufferDecoder
-
-
Method Details
-
checkBuffer
This should only be used when a small number of bytes is required (substantially smaller than bufferSize.- Parameters:
needBytes- the number of bytes needed for the next operation.- Throws:
IOException- if the buffer could not be filled
-
eofCheck
protected abstract int eofCheck(EOFException e, int start, int index, int length) throws EOFException - Throws:
EOFException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
readBoolean
- Returns:
- a boolean from the buffer
- Throws:
IOException- if the underlying operation fails
-
readChar
- Returns:
- a char from the buffer
- Throws:
IOException- if the underlying operation fails
-
readInt
- Returns:
- an integer value from the buffer
- Throws:
IOException- if the underlying operation fails
-
readLArray
- Throws:
IOException
-
readLong
- Returns:
- a long value from the buffer
- Throws:
IOException- if the underlying operation fails
-
readDouble
- Throws:
IOException
-
readFloat
- Throws:
IOException
-
readFully
- Throws:
IOException
-
readShort
- Returns:
- a short from the buffer
- Throws:
IOException- if the underlying operation fails
-
readUncheckedInt
private int readUncheckedInt() -
readUncheckedShort
private int readUncheckedShort()
-