Package com.github.junrar.io
Interface SeekableReadOnlyByteChannel
-
- All Known Implementing Classes:
RawDataIo,SeekableReadOnlyFile,SeekableReadOnlyInputStream
public interface SeekableReadOnlyByteChannelDOCUMENT ME- Version:
- $LastChangedRevision$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this channel.longgetPosition()intread()Read a single byte of data.intread(byte[] buffer, int off, int count)Read up tocountbytes to the specified buffer.intreadFully(byte[] buffer, int count)Read exactlycountbytes to the specified buffer.voidsetPosition(long pos)
-
-
-
Method Detail
-
getPosition
long getPosition() throws java.io.IOException- Returns:
- the current position in the channel
- Throws:
java.io.IOException- .
-
setPosition
void setPosition(long pos) throws java.io.IOException- Parameters:
pos- the position in the channel- Throws:
java.io.IOException- .
-
read
int read() throws java.io.IOException
Read a single byte of data.- Returns:
- read read
- Throws:
java.io.IOException- .
-
read
int read(byte[] buffer, int off, int count) throws java.io.IOExceptionRead up tocountbytes to the specified buffer.- Parameters:
buffer- .off- .count- .- Returns:
- read read
- Throws:
java.io.IOException- .
-
readFully
int readFully(byte[] buffer, int count) throws java.io.IOExceptionRead exactlycountbytes to the specified buffer.- Parameters:
buffer- where to store the read datacount- how many bytes to read- Returns:
- bytes read || -1 if IO problem
- Throws:
java.io.IOException- .
-
close
void close() throws java.io.IOExceptionClose this channel.- Throws:
java.io.IOException- .
-
-