/** * Byte length getter as per spec * @param self ArrayBufferView instance * @return array buffer view length in bytes */ @Getter(attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_WRITABLE | Attribute.NOT_CONFIGURABLE) public static int byteLength(final Object self) { final ArrayBufferView view = (ArrayBufferView)self; return ((TypedArrayData<?>)view.getArray()).getElementLength() * view.bytesPerElement(); }
private int elementLength() { return ((TypedArrayData<?>)getArray()).getElementLength(); }
/** * Factory method for array data * * @param nb underlying nativebuffer * @param start start element * @param end end element * * @return new array data */ public abstract TypedArrayData<?> createArrayData(final ByteBuffer nb, final int start, final int end);
/** * Factory method for array data * * @param nb underlying native buffer * @param start start element * @param end end element * * @return new array data */ public abstract TypedArrayData<?> createArrayData(final ByteBuffer nb, final int start, final int end);