Class SharedDefaultFileRegion

  • All Implemented Interfaces:
    io.netty.channel.FileRegion, io.netty.util.ReferenceCounted

    public class SharedDefaultFileRegion
    extends io.netty.channel.DefaultFileRegion
    Netty's DefaultFileRegion closes the underlying FileChannel as soon as the refCnt() for the region drops to zero, this is an implementation of the DefaultFileRegion that doesn't close the FileChannel. See AsyncChannelOutputPlus for its usage.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void deallocate()  
      static SharedDefaultFileRegion.SharedFileChannel share​(java.nio.channels.FileChannel fileChannel)  
      • Methods inherited from class io.netty.channel.DefaultFileRegion

        count, isOpen, open, position, retain, retain, touch, touch, transfered, transferred, transferTo
      • Methods inherited from class io.netty.util.AbstractReferenceCounted

        refCnt, release, release, setRefCnt
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.util.ReferenceCounted

        refCnt, release, release
    • Method Detail

      • deallocate

        protected void deallocate()
        Overrides:
        deallocate in class io.netty.channel.DefaultFileRegion