|
Oracle Outside In Java API Reference 8.5.4 F11002-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SeekableByteChannel6
Enables API users to handle I/O for the source and destination documents. Implement this interface to control I/O operations such as reading, writing, and seeking. This interface mimics the java.nio.channels.SeekableByteChannel
interface which is only available in Java 7 and later. Note that SeekableByteChannel6
will be removed in favor of java.nio.channels.SeekableByteChannel
if support for Java 6 is dropped in a future release of the Outside In Java API. Until then, this interface must be used if redirected I/O is required.
Method Summary | |
---|---|
long |
position() Returns this channel's position. |
SeekableByteChannel6 |
position(long newPosition) Sets this channel's position. |
int |
read(java.nio.ByteBuffer dst) Reads a sequence of bytes from this channel into the given buffer. |
long |
size() Returns the current size of entity to which this channel is connected. |
SeekableByteChannel6 |
truncate(long size) Truncates the entity, to which this channel is connected, to the given size. |
int |
write(java.nio.ByteBuffer src) Writes a sequence of bytes to this channel from the given buffer. |
Methods inherited from interface java.nio.channels.Channel |
---|
close, isOpen |
Method Detail |
---|
int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
dst
- The buffer into which bytes are to be transferredjava.io.IOException
int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
src
- The buffer from which bytes are to be retrievedjava.io.IOException
long position() throws java.io.IOException
java.io.IOException
SeekableByteChannel6 position(long newPosition) throws java.io.IOException
newPosition
- The new position, a non-negative integer counting the number of bytes from the beginning of the entityjava.io.IOException
long size() throws java.io.IOException
java.io.IOException
SeekableByteChannel6 truncate(long size) throws java.io.IOException
this
.size
- The new size, a non-negative byte countjava.io.IOException
|
Oracle Outside In Java API Reference 8.5.4 F11002-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |