public class RawDataIo extends java.lang.Object implements SeekableReadOnlyByteChannel
| Constructor and Description |
|---|
RawDataIo(SeekableReadOnlyByteChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this channel.
|
javax.crypto.Cipher |
getCipher() |
long |
getPosition() |
int |
read()
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 |
setCipher(javax.crypto.Cipher cipher) |
void |
setPosition(long pos) |
public RawDataIo(SeekableReadOnlyByteChannel channel)
public javax.crypto.Cipher getCipher()
public void setCipher(javax.crypto.Cipher cipher)
public long getPosition()
throws java.io.IOException
getPosition in interface SeekableReadOnlyByteChanneljava.io.IOException - .public void setPosition(long pos)
throws java.io.IOException
setPosition in interface SeekableReadOnlyByteChannelpos - the position in the channeljava.io.IOException - .public int read()
throws java.io.IOException
SeekableReadOnlyByteChannelread in interface SeekableReadOnlyByteChanneljava.io.IOException - .public int read(byte[] buffer,
int off,
int count)
throws java.io.IOException
SeekableReadOnlyByteChannelcount bytes to the specified buffer.read in interface SeekableReadOnlyByteChannelbuffer - .off - .count - .java.io.IOException - .public int readFully(byte[] buffer,
int count)
throws java.io.IOException
SeekableReadOnlyByteChannelcount bytes to the specified buffer.readFully in interface SeekableReadOnlyByteChannelbuffer - where to store the read datacount - how many bytes to readjava.io.IOException - .public void close()
throws java.io.IOException
SeekableReadOnlyByteChannelclose in interface SeekableReadOnlyByteChanneljava.io.IOException - .