com.io7m.jpra.runtime.java

## Interface JPRAStringCursorReadableType

- All Known Subinterfaces:
    JPRAStringCursorType
  All Known Implementing Classes:
    JPRAStringCursorByteBuffered

      public interface JPRAStringCursorReadableType

  The type of read-only pointers to strings.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte` | `getByte(int index)`
    `void` | `getBytes(byte[] buf, int offset, int length)`
    `Charset` | `getEncoding()`
    `int` | `getMaximumLength()`
    `String` | `getNewValue()`
    `int` | `getUsedLength()`

- - ### Method Detail

    - #### getMaximumLength

          int getMaximumLength()

      Returns:
        The maximum length of the string in octets

    - #### getUsedLength

          int getUsedLength()

      Returns:
        The number of octets of the string that are actually being used

    - #### getByte

          byte getByte(int index)
                throws IndexOutOfBoundsException

      Parameters:
        `index` - The byte index
      Returns:
        The byte at index `index` in the string
      Throws:
        `IndexOutOfBoundsException` - Iff `index >= getMaximumLength()`

    - #### getBytes

          void getBytes(byte[] buf,
                        int offset,
                        int length)
                 throws IndexOutOfBoundsException

      Parameters:
        `buf` - The buffer to which string data will be written
        `offset` - The starting index of `buf` to which data will be written
        `length` - The number of octets to copy into `buf`
      Throws:
        `IndexOutOfBoundsException` - Iff `length > getMaximumLength()`

    - #### getNewValue

          String getNewValue()

      Returns:
        A freshly allocated string based on the current contents of the string data

    - #### getEncoding

          Charset getEncoding()

      Returns:
        The string encoding

Copyright © 2017 <code@io7m.com> http://io7m.com