Package nom.tam.util
Class BufferDecoder
java.lang.Object
nom.tam.util.BufferDecoder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
checkBuffer
(int needBytes) This should only be used when a small number of bytes is required (substantially smaller than bufferSize.protected abstract int
eofCheck
(EOFException e, int start, int index, int length) protected int
read
(boolean[] b, int start, int length) protected int
read
(byte[] buf, int offset, int len) protected int
read
(char[] c, int start, int length) protected int
read
(double[] d, int start, int length) protected int
read
(float[] f, int start, int length) protected int
read
(int[] i, int start, int length) protected int
read
(long[] l, int start, int length) protected int
read
(short[] s, int start, int length) protected boolean
protected char
readChar()
protected double
protected float
protected void
readFully
(byte[] b, int off, int len) protected int
readInt()
protected long
readLArray
(Object o) protected long
readLong()
protected short
-
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
-