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.Object
ABufferedChannelBase
adds 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 class
BufferedChannelBase.BufferedChannelClosedException
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.channels.FileChannel
fileChannel
-
Constructor Summary
Constructors Modifier Constructor Description protected
BufferedChannelBase(java.nio.channels.FileChannel fc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
size()
Get the current size of the underlying FileChannel.protected java.nio.channels.FileChannel
validateAndGetFileChannel()
-
-
-
Method Detail
-
validateAndGetFileChannel
protected java.nio.channels.FileChannel validateAndGetFileChannel() throws java.io.IOException
- Throws:
java.io.IOException
-
size
public long size() throws java.io.IOException
Get the current size of the underlying FileChannel.- Returns:
- Throws:
java.io.IOException
-
-