Class BytesHandle

    • Constructor Detail

      • BytesHandle

        public BytesHandle()
    • Method Detail

      • isReadable

        public boolean isReadable()
        Description copied from interface: DataHandle
        Gets whether reading from this handle is supported.
      • isWritable

        public boolean isWritable()
        Description copied from interface: DataHandle
        Gets whether writing to this handle is supported.
      • exists

        public boolean exists()
        Description copied from interface: DataHandle
        Tests whether this handle's location actually exists at the source.
        Returns:
        True if the location exists; false if not.
      • offset

        public long offset()
        Description copied from interface: DataHandle
        Returns the current offset in the stream.
      • length

        public long length()
        Description copied from interface: DataHandle
        Returns the length of the data in bytes.
        Returns:
        The length, or -1 if the length is unknown.
      • setLength

        public void setLength​(long length)
                       throws IOException
        Description copied from interface: DataHandle
        Sets the new length of the handle.
        Parameters:
        length - New length.
        Throws:
        IOException - If there is an error changing the handle's length.
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws IOException
        Description copied from interface: DataHandle
        Reads up to len bytes of data from the stream into an array of bytes.
        Returns:
        the total number of bytes read into the buffer.
        Throws:
        IOException
      • seek

        public void seek​(long pos)
                  throws IOException
        Description copied from interface: DataHandle
        Sets the stream offset, measured from the beginning of the stream, at which the next read or write occurs.
        Throws:
        IOException
      • close

        public void close()
      • getType

        public Class<BytesLocation> getType()
        Description copied from interface: Typed
        Gets the type associated with the object.