Class NativeArrayBufferView

All Implemented Interfaces:
Serializable, ConstProperties, DebuggableObject, IdFunctionCall, Scriptable, SymbolScriptable
Direct Known Subclasses:
NativeDataView, NativeTypedArrayView

public abstract class NativeArrayBufferView extends IdScriptableObject
This class is the abstract parent for all views of the array. It shows a view of the underlying NativeArrayBuffer. Many views may simultaneously share the same buffer, and changes to one will affect all.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • useLittleEndian

      private static Boolean useLittleEndian
    • arrayBuffer

      protected final NativeArrayBuffer arrayBuffer
      Many view objects can share the same backing array
    • offset

      protected final int offset
      The offset, in bytes, from the start of the backing array
    • byteLength

      protected final int byteLength
      The length, in bytes, of the portion of the backing array that we use
    • Id_buffer

      private static final int Id_buffer
      See Also:
    • Id_byteOffset

      private static final int Id_byteOffset
      See Also:
    • Id_byteLength

      private static final int Id_byteLength
      See Also:
    • MAX_INSTANCE_ID

      protected static final int MAX_INSTANCE_ID
      See Also:
  • Constructor Details

    • NativeArrayBufferView

      public NativeArrayBufferView()
    • NativeArrayBufferView

      protected NativeArrayBufferView(NativeArrayBuffer ab, int offset, int byteLength)
  • Method Details

    • getBuffer

      public NativeArrayBuffer getBuffer()
      Return the buffer that backs this view.
    • getByteOffset

      public int getByteOffset()
      Return the offset in bytes from the start of the buffer that this view represents.
    • getByteLength

      public int getByteLength()
      Return the length, in bytes, of the part of the buffer that this view represents.
    • useLittleEndian

      protected static boolean useLittleEndian()
    • isArg

      protected static boolean isArg(Object[] args, int i)
    • getMaxInstanceId

      protected int getMaxInstanceId()
      Description copied from class: IdScriptableObject
      Get maximum id findInstanceIdInfo can generate.
      Overrides:
      getMaxInstanceId in class IdScriptableObject
    • getInstanceIdName

      protected String getInstanceIdName(int id)
      Description copied from class: IdScriptableObject
      Map id back to property name it defines.
      Overrides:
      getInstanceIdName in class IdScriptableObject
    • getInstanceIdValue

      protected Object getInstanceIdValue(int id)
      Description copied from class: IdScriptableObject
      Get id value. * If id value is constant, descendant can call cacheIdValue to store * value in the permanent cache. * Default implementation creates IdFunctionObject instance for given id * and cache its value
      Overrides:
      getInstanceIdValue in class IdScriptableObject
    • findInstanceIdInfo

      protected int findInstanceIdInfo(String s)
      Description copied from class: IdScriptableObject
      Map name to id of instance property. Should return 0 if not found or the result of IdScriptableObject.instanceIdInfo(int, int).
      Overrides:
      findInstanceIdInfo in class IdScriptableObject