Class BufferAlignmentException

All Implemented Interfaces:
Serializable

public class BufferAlignmentException extends RuntimeException
Runtime Exception thrown by BufferAlignmentAgent when an unaligned memory access is detected.

Package-protected to discourage catching since this as agent should be used only for testing and debugging.

See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • index

      private final int index
    • addressOffset

      private final long addressOffset
  • Constructor Details

    • BufferAlignmentException

      public BufferAlignmentException(String prefix, int index, long addressOffset)
      Create exception with details about the unaligned access.
      Parameters:
      prefix - for the error message.
      index - at which the unaligned access occurred.
      addressOffset - pointing to the beginning of the underlying buffer.
  • Method Details

    • index

      public int index()
      Returns an index at which unaligned access occurred.
      Returns:
      index.
    • addressOffset

      public long addressOffset()
      Returns an address offset into the start of the underlying buffer.
      Returns:
      address of the beginning of the underlying buffer.