Class ByteBuffer

java.lang.Object
com.luciad.containers.ByteBuffer
All Implemented Interfaces:
AutoCloseable

public final class ByteBuffer extends Object implements AutoCloseable
Represents an implicitly shared buffer of bytes, ie.

ByteBuffer copies (i.e. the copy constructor or assignment operator) result in shallow copies.

Note
Primitive type values are translated from sequences of bytes according to the native byte order of the underlying platform (i.e. LITTLE_ENDIAN or BIG_ENDIAN).
Note
If you create a ByteBuffer using a byte array allocated or manipulated through a java.nio.ByteBuffer, please pay attention to the byte order, since the initial order of a java.nio.ByteBuffer is always BIG_ENDIAN. If you want to make use of a java.nio.ByteBuffer, please change its byte order to the native byte order of the underlying platform.
  • Constructor Details Link icon

    • ByteBuffer Link icon

      public ByteBuffer(byte[] data)
  • Method Details Link icon

    • finalize Link icon

      protected void finalize()
      Overrides:
      finalize in class Object
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getData Link icon

      public byte[] getData()
      Returns the underlying byte array.
      Returns:
      the underlying byte array.