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 Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
public long position()
position
in interface SeekableByteChannel
public ByteChannelAligner<T> position(long pos) throws IOException
position
in interface SeekableByteChannel
IOException
public long size()
size
in interface SeekableByteChannel
public int readBytes(byte[] dst, int offset, int length) throws IOException
IOException
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
read
in interface SeekableByteChannel
IOException
public int writeBytes(byte[] src, int offset, int length) throws IOException
IOException
public int write(ByteBuffer src) throws IOException
write
in interface SeekableByteChannel
write
in interface WritableByteChannel
IOException
public void write(int b) throws IOException
IOException
public int read() throws IOException
IOException
public ByteChannelAligner<T> truncate(long size) throws IOException
truncate
in interface SeekableByteChannel
IOException
public void flush() throws IOException
IOException
Copyright © 2014. All Rights Reserved.