Interface SeekableReadOnlyByteChannel

All Known Implementing Classes:
RawDataIo, SeekableReadOnlyFile, SeekableReadOnlyInputStream

public interface SeekableReadOnlyByteChannel
DOCUMENT ME
Version:
$LastChangedRevision$
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close this channel.
    long
     
    int
    Read a single byte of data.
    int
    read(byte[] buffer, int off, int count)
    Read up to count bytes to the specified buffer.
    int
    readFully(byte[] buffer, int count)
    Read exactly count bytes to the specified buffer.
    void
    setPosition(long pos)
     
  • Method Details

    • getPosition

      long getPosition() throws IOException
      Returns:
      the current position in the channel
      Throws:
      IOException - .
    • setPosition

      void setPosition(long pos) throws IOException
      Parameters:
      pos - the position in the channel
      Throws:
      IOException - .
    • read

      int read() throws IOException
      Read a single byte of data.
      Returns:
      read read
      Throws:
      IOException - .
    • read

      int read(byte[] buffer, int off, int count) throws IOException
      Read up to count bytes to the specified buffer.
      Parameters:
      buffer - .
      off - .
      count - .
      Returns:
      read read
      Throws:
      IOException - .
    • readFully

      int readFully(byte[] buffer, int count) throws IOException
      Read exactly count bytes to the specified buffer.
      Parameters:
      buffer - where to store the read data
      count - how many bytes to read
      Returns:
      bytes read || -1 if IO problem
      Throws:
      IOException - .
    • close

      void close() throws IOException
      Close this channel.
      Throws:
      IOException - .