public abstract class ByteChannelAligner<T extends JaydioByteBuffer> extends Object implements SeekableByteChannel
| Constructor and Description |
|---|
ByteChannelAligner(DirectIoLib lib,
BufferedChannel<T> channel,
T buffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
boolean |
isOpen() |
long |
position() |
ByteChannelAligner<T> |
position(long pos) |
int |
read() |
int |
read(ByteBuffer dst) |
int |
readBytes(byte[] dst,
int offset,
int length) |
long |
size() |
ByteChannelAligner<T> |
truncate(long size) |
int |
write(ByteBuffer src) |
void |
write(int b) |
int |
writeBytes(byte[] src,
int offset,
int length) |
public ByteChannelAligner(DirectIoLib lib, BufferedChannel<T> channel, T buffer)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic long position()
position in interface SeekableByteChannelpublic ByteChannelAligner<T> position(long pos) throws IOException
position in interface SeekableByteChannelIOExceptionpublic long size()
size in interface SeekableByteChannelpublic int readBytes(byte[] dst,
int offset,
int length)
throws IOException
IOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelread in interface SeekableByteChannelIOExceptionpublic int writeBytes(byte[] src,
int offset,
int length)
throws IOException
IOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface SeekableByteChannelwrite in interface WritableByteChannelIOExceptionpublic void write(int b)
throws IOException
IOExceptionpublic int read()
throws IOException
IOExceptionpublic ByteChannelAligner<T> truncate(long size) throws IOException
truncate in interface SeekableByteChannelIOExceptionpublic void flush()
throws IOException
IOExceptionCopyright © 2014. All Rights Reserved.