Package nom.tam.util

Class BufferDecoder

java.lang.Object
nom.tam.util.BufferDecoder

public abstract class BufferDecoder extends Object
  • Field Details

  • Constructor Details

    • BufferDecoder

      public BufferDecoder(BufferPointer sharedBuffer)
  • Method Details

    • checkBuffer

      protected abstract void checkBuffer(int needBytes) throws IOException
      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

      protected int read(boolean[] b, int start, int length) throws IOException
      Throws:
      IOException
    • read

      protected int read(byte[] buf, int offset, int len) throws IOException
      Throws:
      IOException
    • read

      protected int read(char[] c, int start, int length) throws IOException
      Throws:
      IOException
    • read

      protected int read(double[] d, int start, int length) throws IOException
      Throws:
      IOException
    • read

      protected int read(float[] f, int start, int length) throws IOException
      Throws:
      IOException
    • read

      protected int read(int[] i, int start, int length) throws IOException
      Throws:
      IOException
    • read

      protected int read(long[] l, int start, int length) throws IOException
      Throws:
      IOException
    • read

      protected int read(short[] s, int start, int length) throws IOException
      Throws:
      IOException
    • readBoolean

      protected boolean readBoolean() throws IOException
      Returns:
      a boolean from the buffer
      Throws:
      IOException - if the underlying operation fails
    • readChar

      protected char readChar() throws IOException
      Returns:
      a char from the buffer
      Throws:
      IOException - if the underlying operation fails
    • readInt

      protected int readInt() throws IOException
      Returns:
      an integer value from the buffer
      Throws:
      IOException - if the underlying operation fails
    • readLArray

      protected long readLArray(Object o) throws IOException
      Throws:
      IOException
    • readLong

      protected long readLong() throws IOException
      Returns:
      a long value from the buffer
      Throws:
      IOException - if the underlying operation fails
    • readDouble

      protected double readDouble() throws IOException
      Throws:
      IOException
    • readFloat

      protected float readFloat() throws IOException
      Throws:
      IOException
    • readFully

      protected void readFully(byte[] b, int off, int len) throws IOException
      Throws:
      IOException
    • readShort

      protected short readShort() throws IOException
      Returns:
      a short from the buffer
      Throws:
      IOException - if the underlying operation fails
    • readUncheckedInt

      private int readUncheckedInt()
    • readUncheckedShort

      private int readUncheckedShort()