Module com.github.akurilov.commons
Class BufferedByteChannelBase
- java.lang.Object
-
- com.github.akurilov.commons.io.util.BufferedByteChannelBase
-
- All Implemented Interfaces:
BufferedByteChannel,java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel
- Direct Known Subclasses:
InputStreamWrapperChannel,OutputStreamWrapperChannel
public abstract class BufferedByteChannelBase extends java.lang.Object implements BufferedByteChannel
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]bbprotected java.nio.ByteBufferbufferprotected static intREUSABLE_BUFF_SIZE_MAXprotected static intREUSABLE_BUFF_SIZE_MIN
-
Constructor Summary
Constructors Modifier Constructor Description protectedBufferedByteChannelBase(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBufferbuffer()booleanisOpen()
-
-
-
Field Detail
-
REUSABLE_BUFF_SIZE_MIN
protected static final int REUSABLE_BUFF_SIZE_MIN
- See Also:
- Constant Field Values
-
REUSABLE_BUFF_SIZE_MAX
protected static final int REUSABLE_BUFF_SIZE_MAX
- See Also:
- Constant Field Values
-
bb
protected final byte[] bb
-
buffer
protected final java.nio.ByteBuffer buffer
-
-
Method Detail
-
buffer
public final java.nio.ByteBuffer buffer()
- Specified by:
bufferin interfaceBufferedByteChannel- Returns:
- the wrapped byte buffer which is used for bytes transfer
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
-