Class StructAccessor

java.lang.Object
com.jogamp.common.nio.StructAccessor

public class StructAccessor extends Object
Author:
Kenneth Russel, et al.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    getBooleanAt(int byteOffset)
    Retrieves the boolean at the specified byteOffset.
    final boolean[]
    getBooleansAt(int byteOffset, boolean[] v)
     
     
    final byte
    getByteAt(int byteOffset)
    Retrieves the byte at the specified byteOffset.
    final byte[]
    getBytesAt(int byteOffset, byte[] v)
     
    final char
    getCharAt(int byteOffset)
    Retrieves the char at the specified byteOffset.
    final char[]
    getCharsAt(int byteOffset, char[] v)
     
    final double
    getDoubleAt(int byteOffset)
    Retrieves the double at the specified byteOffset.
    final double[]
    getDoublesAt(int byteOffset, double[] v)
     
    final float
    getFloatAt(int byteOffset)
    Retrieves the float at the specified byteOffset.
    final float[]
    getFloatsAt(int byteOffset, float[] v)
     
    final int
    getIntAt(int byteOffset)
    Retrieves the int at the specified byteOffset.
    final int
    getIntAt(int byteOffset, int nativeSizeInBytes)
    Retrieves the int at the specified byteOffset.
    final int[]
    getIntsAt(int byteOffset, int[] v)
     
    final long
    getLongAt(int byteOffset)
    Retrieves the long at the specified byteOffset.
    final long
    getLongAt(int byteOffset, int nativeSizeInBytes)
    Retrieves the long at the specified byteOffset.
    final long[]
    getLongsAt(int byteOffset, long[] v)
     
    final short
    getShortAt(int byteOffset)
    Retrieves the short at the specified byteOffset.
    final short[]
    getShortsAt(int byteOffset, short[] v)
     
    final void
    setBooleanAt(int byteOffset, boolean v)
    Puts a boolean at the specified byteOffset.
    final void
    setBooleansAt(int byteOffset, boolean[] v)
     
    final void
    setByteAt(int byteOffset, byte v)
    Puts a byte at the specified byteOffset.
    final void
    setBytesAt(int byteOffset, byte[] v)
     
    final void
    setCharAt(int byteOffset, char v)
    Puts a char at the specified byteOffset.
    final void
    setCharsAt(int byteOffset, char[] v)
     
    final void
    setDoubleAt(int byteOffset, double v)
    Puts a double at the specified byteOffset.
    final void
    setDoublesAt(int byteOffset, double[] v)
     
    final void
    setFloatAt(int byteOffset, float v)
    Puts a float at the specified byteOffset.
    final void
    setFloatsAt(int byteOffset, float[] v)
     
    final void
    setIntAt(int byteOffset, int v)
    Puts a int at the specified byteOffset.
    final void
    setIntAt(int byteOffset, int v, int nativeSizeInBytes)
    Puts a int at the specified byteOffset.
    final void
    setIntsAt(int byteOffset, int[] v)
     
    final void
    setLongAt(int byteOffset, long v)
    Puts a long at the specified byteOffset.
    final void
    setLongAt(int byteOffset, long v, int nativeSizeInBytes)
    Puts a long at the specified byteOffset.
    final void
    setLongsAt(int byteOffset, long[] v)
     
    final void
    setShortAt(int byteOffset, short v)
    Puts a short at the specified byteOffset.
    final void
    setShortsAt(int byteOffset, short[] v)
     
    slice(int byteOffset, int byteLength)
    Returns a slice of the current ByteBuffer starting at the specified byte offset and extending the specified number of bytes.

    Methods inherited from class java.lang.Object

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

    • StructAccessor

      public StructAccessor(ByteBuffer bb)
  • Method Details

    • getBuffer

      public final ByteBuffer getBuffer()
    • slice

      public final ByteBuffer slice(int byteOffset, int byteLength)
      Returns a slice of the current ByteBuffer starting at the specified byte offset and extending the specified number of bytes. Note that this method is not thread-safe with respect to the other methods in this class.
    • getByteAt

      public final byte getByteAt(int byteOffset)
      Retrieves the byte at the specified byteOffset.
    • setByteAt

      public final void setByteAt(int byteOffset, byte v)
      Puts a byte at the specified byteOffset.
    • getBooleanAt

      public final boolean getBooleanAt(int byteOffset)
      Retrieves the boolean at the specified byteOffset.
    • setBooleanAt

      public final void setBooleanAt(int byteOffset, boolean v)
      Puts a boolean at the specified byteOffset.
    • getCharAt

      public final char getCharAt(int byteOffset)
      Retrieves the char at the specified byteOffset.
    • setCharAt

      public final void setCharAt(int byteOffset, char v)
      Puts a char at the specified byteOffset.
    • getShortAt

      public final short getShortAt(int byteOffset)
      Retrieves the short at the specified byteOffset.
    • setShortAt

      public final void setShortAt(int byteOffset, short v)
      Puts a short at the specified byteOffset.
    • getIntAt

      public final int getIntAt(int byteOffset)
      Retrieves the int at the specified byteOffset.
    • setIntAt

      public final void setIntAt(int byteOffset, int v)
      Puts a int at the specified byteOffset.
    • getIntAt

      public final int getIntAt(int byteOffset, int nativeSizeInBytes)
      Retrieves the int at the specified byteOffset.
    • setIntAt

      public final void setIntAt(int byteOffset, int v, int nativeSizeInBytes)
      Puts a int at the specified byteOffset.
    • getFloatAt

      public final float getFloatAt(int byteOffset)
      Retrieves the float at the specified byteOffset.
    • setFloatAt

      public final void setFloatAt(int byteOffset, float v)
      Puts a float at the specified byteOffset.
    • getDoubleAt

      public final double getDoubleAt(int byteOffset)
      Retrieves the double at the specified byteOffset.
    • setDoubleAt

      public final void setDoubleAt(int byteOffset, double v)
      Puts a double at the specified byteOffset.
    • getLongAt

      public final long getLongAt(int byteOffset)
      Retrieves the long at the specified byteOffset.
    • setLongAt

      public final void setLongAt(int byteOffset, long v)
      Puts a long at the specified byteOffset.
    • getLongAt

      public final long getLongAt(int byteOffset, int nativeSizeInBytes)
      Retrieves the long at the specified byteOffset.
    • setLongAt

      public final void setLongAt(int byteOffset, long v, int nativeSizeInBytes)
      Puts a long at the specified byteOffset.
    • setBytesAt

      public final void setBytesAt(int byteOffset, byte[] v)
    • getBytesAt

      public final byte[] getBytesAt(int byteOffset, byte[] v)
    • setBooleansAt

      public final void setBooleansAt(int byteOffset, boolean[] v)
    • getBooleansAt

      public final boolean[] getBooleansAt(int byteOffset, boolean[] v)
    • setCharsAt

      public final void setCharsAt(int byteOffset, char[] v)
    • getCharsAt

      public final char[] getCharsAt(int byteOffset, char[] v)
    • setShortsAt

      public final void setShortsAt(int byteOffset, short[] v)
    • getShortsAt

      public final short[] getShortsAt(int byteOffset, short[] v)
    • setIntsAt

      public final void setIntsAt(int byteOffset, int[] v)
    • getIntsAt

      public final int[] getIntsAt(int byteOffset, int[] v)
    • setFloatsAt

      public final void setFloatsAt(int byteOffset, float[] v)
    • getFloatsAt

      public final float[] getFloatsAt(int byteOffset, float[] v)
    • setDoublesAt

      public final void setDoublesAt(int byteOffset, double[] v)
    • getDoublesAt

      public final double[] getDoublesAt(int byteOffset, double[] v)
    • setLongsAt

      public final void setLongsAt(int byteOffset, long[] v)
    • getLongsAt

      public final long[] getLongsAt(int byteOffset, long[] v)