public class V8ValueArrayBuffer extends V8ValueObject
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BYTE_LENGTH_1
The constant BYTE_LENGTH_1 for 1-byte shift (short).
|
protected static int |
BYTE_LENGTH_2
The constant BYTE_LENGTH_2 for 2-byte shift (int/float).
|
protected static int |
BYTE_LENGTH_3
The constant BYTE_LENGTH_3 for 3-byte shift (long/double).
|
protected java.nio.ByteBuffer |
byteBuffer
The byte buffer backing this ArrayBuffer.
|
protected java.nio.ByteOrder |
byteOrder
The byte order used for multi-byte conversions.
|
protected static java.lang.String |
PROPERTY_BYTE_LENGTH
The constant PROPERTY_BYTE_LENGTH.
|
ERROR_THE_KEY_VALUE_PAIR_MUST_MATCH, FUNCTION_ADD, FUNCTION_DELETE, FUNCTION_GET, FUNCTION_HAS, FUNCTION_SET, METHOD_PREFIX_GET, METHOD_PREFIX_IS, METHOD_PREFIX_SET, PROPERTY_PROTOTYPEhandle, INVALID_HANDLE, weakOBJECT_CONVERTER, v8RuntimeDEFAULT_BATCH_SIZE, MIN_BATCH_SIZE| Modifier and Type | Method and Description |
|---|---|
boolean |
fromBytes(byte[] bytes)
Copies the given byte array into this ArrayBuffer.
|
boolean |
fromDoubles(double[] doubles)
Copies the given double array into this ArrayBuffer.
|
boolean |
fromFloats(float[] floats)
Copies the given float array into this ArrayBuffer.
|
boolean |
fromIntegers(int[] integers)
Copies the given integer array into this ArrayBuffer.
|
boolean |
fromLongs(long[] longs)
Copies the given long array into this ArrayBuffer.
|
boolean |
fromShorts(short[] shorts)
Copies the given short array into this ArrayBuffer.
|
java.nio.ByteBuffer |
getByteBuffer()
Gets the underlying byte buffer.
|
int |
getByteLength()
Gets the byte length of this ArrayBuffer.
|
java.nio.ByteOrder |
getByteOrder()
Gets the byte order used for multi-byte conversions.
|
V8ValueReferenceType |
getType()
Returns the reference type of this V8 value.
|
void |
setByteOrder(java.nio.ByteOrder byteOrder)
Sets the byte order used for multi-byte conversions.
|
byte[] |
toBytes()
Converts the ArrayBuffer contents to a byte array.
|
double[] |
toDoubles()
Converts the ArrayBuffer contents to a double array.
|
float[] |
toFloats()
Converts the ArrayBuffer contents to a float array.
|
int[] |
toIntegers()
Converts the ArrayBuffer contents to an integer array.
|
long[] |
toLongs()
Converts the ArrayBuffer contents to a long array.
|
short[] |
toShorts()
Converts the ArrayBuffer contents to a short array.
|
batchGet, bind, bindFunction, bindProperty, delete, deletePrivateProperty, forEach, forEach, get, getBoolean, getDouble, getIdentityHash, getInteger, getLong, getOwnPropertyNames, getPrivateProperty, getProperty, getPropertyNames, getPrototype, getString, has, hasInternalType, hasOwnProperty, hasPrivateProperty, invokeExtended, invokeExtended, isFrozen, isSealed, sameValue, set, set, setBoolean, setDouble, setInteger, setLong, setNull, setPrivateProperty, setProperty, setPrototype, setString, setUndefined, strictEquals, toJsonString, toProtoString, unbind, unbindFunction, unbindProperty, unbindProperty, unbindProperty, unbindPropertyaddReference, checkV8Runtime, clearWeak, close, close, equals, getHandle, isClosed, isWeak, isWeak, removeReference, setWeak, toClone, toStringgetV8Runtimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbindFunction, bindFunction, bindProperty, deleteNull, deleteUndefined, forEach, forEach, forEach, forEach, forEach, forEach, getBigInteger, getFloat, getNull, getObject, getOwnPropertyNameStrings, getPrivatePropertyBoolean, getPrivatePropertyDouble, getPrivatePropertyFloat, getPrivatePropertyInteger, getPrivatePropertyLong, getPrivatePropertyNull, getPrivatePropertyObject, getPrivatePropertyPrimitive, getPrivatePropertyString, getPrivatePropertyUndefined, getPrivatePropertyZonedDateTime, getPropertyBoolean, getPropertyDouble, getPropertyFloat, getPropertyInteger, getPropertyLong, getPropertyObject, getPropertyPrimitive, getPropertyString, getPropertyZonedDateTime, getUndefined, getZonedDateTime, hasNull, hasUndefined, invoke, invoke, invokeBigInteger, invokeBoolean, invokeDouble, invokeFloat, invokeInteger, invokeLong, invokeObject, invokeString, invokeVoid, invokeVoid, invokeZonedDateTime, isGeneratorObject, setPrivatePropertyNull, setPrivatePropertyUndefined, setPropertyNull, setPropertyUndefined, unbindFunction, unbindFunction, unbindFunction, unbindPropertyclearWeak, close, getHandle, isClosed, isWeak, isWeak, setWeakasBoolean, asDouble, asInt, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefinedclosetoClone, toCloneprotected static final int BYTE_LENGTH_1
protected static final int BYTE_LENGTH_2
protected static final int BYTE_LENGTH_3
protected static final java.lang.String PROPERTY_BYTE_LENGTH
protected java.nio.ByteBuffer byteBuffer
protected java.nio.ByteOrder byteOrder
public boolean fromBytes(byte[] bytes)
bytes - the byte array to copy frompublic boolean fromDoubles(double[] doubles)
doubles - the double array to copy frompublic boolean fromFloats(float[] floats)
floats - the float array to copy frompublic boolean fromIntegers(int[] integers)
integers - the integer array to copy frompublic boolean fromLongs(long[] longs)
longs - the long array to copy frompublic boolean fromShorts(short[] shorts)
shorts - the short array to copy frompublic java.nio.ByteBuffer getByteBuffer()
public int getByteLength()
throws JavetException
JavetException - the javet exceptionpublic java.nio.ByteOrder getByteOrder()
public V8ValueReferenceType getType()
IV8ValueReferencegetType in interface IV8ValueReferencegetType in class V8ValueObjectpublic void setByteOrder(java.nio.ByteOrder byteOrder)
byteOrder - the byte orderpublic byte[] toBytes()
public double[] toDoubles()
public float[] toFloats()
public int[] toIntegers()
public long[] toLongs()
public short[] toShorts()