Interface LongString

  • public interface LongString
    An object providing access to a LongString. This might be implemented to read directly from connection socket, depending on the size of the content to be read - long strings may contain up to 4Gb of content.
    • Method Detail

      • length

        long length()
        the length of the string in bytes between 0 and MAX_LENGTH (inclusive)
      • getStream

        DataInputStream getStream()
                           throws IOException
        Get the content stream. Repeated calls to this function return the same stream, which may not support rewind.
        An input stream that reads the content of the string
        IOException - if an error is encountered
      • getBytes

        byte[] getBytes()
        Get the content as a byte array. This need not be a copy. Updates to the returned array may change the value of the string. Repeated calls to this function may return the same array. This function will fail if this string's length is greater than Integer.MAX_VALUE, throwing an IllegalStateException.
        the array of bytes containing the content of the LongString
      • toString

        String toString()
        Get the content as a String. Uses UTF-8 as encoding.
        toString in class Object
        he content of the LongString as a string