Interface JsArrayBuffer

All Superinterfaces:
JsObject

public interface JsArrayBuffer extends JsObject
A JavaScript array buffer.

An array buffer object can be passed between Java and JavaScript as a method argument or a return value. The object lifetime is bound to the lifetime of the frame this object belongs to. When the owner frame is unloaded, all the JavaScript objects are automatically disposed.

An attempt to access a disposed JavaScript object will result in IllegalStateException.

Since:
7.20
  • Method Details

    • length

      long length()
      Returns the length of this array buffer in bytes.
      Throws:
      ObjectClosedException - when the JavaScript object is already disposed or invalid
    • bytes

      byte[] bytes()
      Returns a byte array containing the bytes of this array buffer.
      Throws:
      ObjectClosedException - when the JavaScript object is already disposed or invalid