Package org.apache.bookkeeper.bookie
Class BufferedChannelBase
- java.lang.Object
-
- org.apache.bookkeeper.bookie.BufferedChannelBase
-
- Direct Known Subclasses:
BufferedReadChannel
public abstract class BufferedChannelBase extends java.lang.ObjectABufferedChannelBaseadds functionality to an existing file channel, the ability to buffer the input and output data. This class is a base class for wrapping theFileChannel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classBufferedChannelBase.BufferedChannelClosedException
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.channels.FileChannelfileChannel
-
Constructor Summary
Constructors Modifier Constructor Description protectedBufferedChannelBase(java.nio.channels.FileChannel fc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longsize()Get the current size of the underlying FileChannel.protected java.nio.channels.FileChannelvalidateAndGetFileChannel()
-
-
-
Method Detail
-
validateAndGetFileChannel
protected java.nio.channels.FileChannel validateAndGetFileChannel() throws java.io.IOException- Throws:
java.io.IOException
-
size
public long size() throws java.io.IOExceptionGet the current size of the underlying FileChannel.- Returns:
- Throws:
java.io.IOException
-
-