Class BufferedChannelBase

  • Direct Known Subclasses:
    BufferedReadChannel

    public abstract class BufferedChannelBase
    extends java.lang.Object
    A BufferedChannelBase adds functionality to an existing file channel, the ability to buffer the input and output data. This class is a base class for wrapping the FileChannel.
    • 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fileChannel

        protected final java.nio.channels.FileChannel fileChannel
    • Constructor Detail

      • BufferedChannelBase

        protected BufferedChannelBase​(java.nio.channels.FileChannel fc)
    • 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