Class AbstractIoUringStreamChannel.ByteBufWritableByteChannel

java.lang.Object
io.netty.channel.uring.AbstractIoUringStreamChannel.ByteBufWritableByteChannel
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.Channel, java.nio.channels.WritableByteChannel
Enclosing class:
AbstractIoUringStreamChannel

private static final class AbstractIoUringStreamChannel.ByteBufWritableByteChannel extends java.lang.Object implements java.nio.channels.WritableByteChannel
A WritableByteChannel backed by a ByteBuf. Writes are capped to ByteBuf.writableBytes() to prevent overflow when FileRegion.transferTo(WritableByteChannel, long) writes more than the chunk size.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final ByteBuf
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
     
    int
    write(java.nio.ByteBuffer src)
     

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • ByteBufWritableByteChannel

      ByteBufWritableByteChannel(ByteBuf buf)
  • Method Details

    • write

      public int write(java.nio.ByteBuffer src)
      Specified by:
      write in interface java.nio.channels.WritableByteChannel
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface java.nio.channels.Channel
    • close

      public void close()
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface java.nio.channels.Channel
      Specified by:
      close in interface java.io.Closeable