Class ABlobLike<T extends ACell>

Type Parameters:
T - type of conceptual elements
All Implemented Interfaces:
IValidated, IWriteable
Direct Known Subclasses:
ABlob, AString

public abstract class ABlobLike<T extends ACell> extends ACountable<T>
Abstract base class for Blob-like objects, which conceptually behave as a sequence of bytes.
  • Constructor Details

    • ABlobLike

      public ABlobLike()
  • Method Details

    • byteAt

      public abstract byte byteAt(long i)
      Gets the byte at the specified position. Result is undefined if out of range.
      Parameters:
      i - Index of the byte to get
      Returns:
      The byte at the specified position
    • empty

      public abstract ABlobLike<T> empty()
      Description copied from class: ACountable
      Returns a canonical, singleton empty instance of the same type as this Countable value.
      Specified by:
      empty in class ACountable<T extends ACell>
      Returns:
      An empty Countable value
    • getBytes

      public byte[] getBytes()
      Gets a byte array containing a copy of this Blob.
      Returns:
      A new byte array containing the contents of this blob.
    • getBytes

      public abstract int getBytes(byte[] dest, int destOffset)
      Copies the bytes from this instance to a given destination
      Parameters:
      dest - Destination array
      destOffset - Offset into destination array
      Returns:
      End position in destination array after writing