public final class InvalidBufferOffsetException extends InteropException
InvalidBufferOffsetException.getByteOffset(),
InvalidBufferOffsetException.getLength(),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
static InvalidBufferOffsetException |
create(long byteOffset,
long length)
Creates an
InvalidBufferOffsetException to indicate that a buffer access is invalid. |
static InvalidBufferOffsetException |
create(long byteOffset,
long length,
Throwable cause)
Creates an
InvalidBufferOffsetException to indicate that a buffer access is invalid. |
long |
getByteOffset()
Returns the start byte offset of the invalid access from the start of the buffer.
|
long |
getLength()
Returns the length of the accessed memory region in bytes starting from
the start byte offset. |
String |
getMessage() |
fillInStackTrace, getCauseaddSuppressed, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic long getByteOffset()
public long getLength()
the start byte offset.public String getMessage()
getMessage in class Throwablepublic static InvalidBufferOffsetException create(long byteOffset, long length)
InvalidBufferOffsetException to indicate that a buffer access is invalid.byteOffset - the start byteOffset of the invalid accesslength - the length of the accessed memory region in bytes starting from
byteOffsetpublic static InvalidBufferOffsetException create(long byteOffset, long length, Throwable cause)
InvalidBufferOffsetException to indicate that a buffer access is invalid.
In addition a cause may be provided. The cause should only be set if the guest language code caused this problem. An example for this is a language specific proxy mechanism that invokes guest language code to describe an object. If the guest language code fails to execute and this interop exception is a valid interpretation of the error, then the error should be provided as cause.
byteOffset - the start byteOffset of the invalid accesslength - the length of the accessed memory region in bytes starting from
byteOffset.cause - the guest language exception that caused the error.