Class ByteArrayCodec

java.lang.Object
com.bc.ceres.binio.util.ByteArrayCodec

public abstract class ByteArrayCodec extends Object
A utility class used to decode/encode primitive Java types from/to a byte buffer using a specified ByteOrder.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ByteArrayCodec
     
    static final ByteArrayCodec
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final byte
    getByte(byte[] b, int boff)
     
    abstract ByteOrder
     
    final void
    getBytes(byte[] b, int boff, byte[] v, int voff, int vlen)
     
    abstract double
    getDouble(byte[] b, int boff)
     
    abstract void
    getDoubles(byte[] b, int boff, double[] v, int voff, int vlen)
     
    abstract float
    getFloat(byte[] b, int boff)
     
    abstract void
    getFloats(byte[] b, int boff, float[] v, int voff, int vlen)
     
     
    abstract int
    getInt(byte[] b, int boff)
     
    abstract void
    getInts(byte[] b, int boff, int[] v, int voff, int vlen)
     
    abstract long
    getLong(byte[] b, int boff)
     
    abstract void
    getLongs(byte[] b, int boff, long[] v, int voff, int vlen)
     
    abstract short
    getShort(byte[] b, int boff)
     
    abstract void
    getShorts(byte[] b, int boff, short[] v, int voff, int vlen)
     
    final void
    setByte(byte[] b, int boff, byte v)
     
    final void
    setBytes(byte[] b, int boff, byte[] v, int voff, int vlen)
     
    abstract void
    setDouble(byte[] b, int boff, double v)
     
    abstract void
    setDoubles(byte[] b, int boff, double[] v, int voff, int vlen)
     
    abstract void
    setFloat(byte[] b, int boff, float v)
     
    abstract void
    setFloats(byte[] b, int boff, float[] v, int voff, int vlen)
     
    abstract void
    setInt(byte[] b, int boff, int v)
     
    abstract void
    setInts(byte[] b, int boff, int[] v, int voff, int vlen)
     
    abstract void
    setLong(byte[] b, int boff, long v)
     
    abstract void
    setLongs(byte[] b, int boff, long[] v, int voff, int vlen)
     
    abstract void
    setShort(byte[] b, int boff, short v)
     
    abstract void
    setShorts(byte[] b, int boff, short[] v, int voff, int vlen)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ByteArrayCodec

      protected ByteArrayCodec()
  • Method Details

    • getInstance

      public static ByteArrayCodec getInstance(ByteOrder byteOrder)
    • getByteOrder

      public abstract ByteOrder getByteOrder()
    • getByte

      public final byte getByte(byte[] b, int boff)
    • getShort

      public abstract short getShort(byte[] b, int boff)
    • getInt

      public abstract int getInt(byte[] b, int boff)
    • getLong

      public abstract long getLong(byte[] b, int boff)
    • getFloat

      public abstract float getFloat(byte[] b, int boff)
    • getDouble

      public abstract double getDouble(byte[] b, int boff)
    • getBytes

      public final void getBytes(byte[] b, int boff, byte[] v, int voff, int vlen)
    • getShorts

      public abstract void getShorts(byte[] b, int boff, short[] v, int voff, int vlen)
    • getInts

      public abstract void getInts(byte[] b, int boff, int[] v, int voff, int vlen)
    • getLongs

      public abstract void getLongs(byte[] b, int boff, long[] v, int voff, int vlen)
    • getFloats

      public abstract void getFloats(byte[] b, int boff, float[] v, int voff, int vlen)
    • getDoubles

      public abstract void getDoubles(byte[] b, int boff, double[] v, int voff, int vlen)
    • setByte

      public final void setByte(byte[] b, int boff, byte v)
    • setShort

      public abstract void setShort(byte[] b, int boff, short v)
    • setInt

      public abstract void setInt(byte[] b, int boff, int v)
    • setLong

      public abstract void setLong(byte[] b, int boff, long v)
    • setFloat

      public abstract void setFloat(byte[] b, int boff, float v)
    • setDouble

      public abstract void setDouble(byte[] b, int boff, double v)
    • setBytes

      public final void setBytes(byte[] b, int boff, byte[] v, int voff, int vlen)
    • setShorts

      public abstract void setShorts(byte[] b, int boff, short[] v, int voff, int vlen)
    • setInts

      public abstract void setInts(byte[] b, int boff, int[] v, int voff, int vlen)
    • setLongs

      public abstract void setLongs(byte[] b, int boff, long[] v, int voff, int vlen)
    • setFloats

      public abstract void setFloats(byte[] b, int boff, float[] v, int voff, int vlen)
    • setDoubles

      public abstract void setDoubles(byte[] b, int boff, double[] v, int voff, int vlen)