public class ByteArrayReadableSeekableByteChannel extends Object implements SeekableByteChannel
| Constructor and Description |
|---|
ByteArrayReadableSeekableByteChannel(byte[] byteArray) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
SeekableByteChannel |
position(long newPosition) |
int |
read(ByteBuffer dst) |
long |
size() |
SeekableByteChannel |
truncate(long size) |
int |
write(ByteBuffer src) |
public ByteArrayReadableSeekableByteChannel(byte[] byteArray)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelread in interface SeekableByteChannelIOExceptionpublic long position()
throws IOException
position in interface SeekableByteChannelIOExceptionpublic SeekableByteChannel position(long newPosition) throws IOException
position in interface SeekableByteChannelIOExceptionpublic long size()
throws IOException
size in interface SeekableByteChannelIOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface SeekableByteChannelwrite in interface WritableByteChannelIOExceptionpublic SeekableByteChannel truncate(long size) throws IOException
truncate in interface SeekableByteChannelIOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.