Package io.netty.channel.uring
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.WritableByteChannelAWritableByteChannelbacked by aByteBuf. Writes are capped toByteBuf.writableBytes()to prevent overflow whenFileRegion.transferTo(java.nio.channels.WritableByteChannel, long)writes more than the chunk size.
-
-
Constructor Summary
Constructors Constructor Description ByteBufWritableByteChannel(ByteBuf buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisOpen()intwrite(java.nio.ByteBuffer src)
-
-
-
Field Detail
-
buf
private final ByteBuf buf
-
-
Constructor Detail
-
ByteBufWritableByteChannel
ByteBufWritableByteChannel(ByteBuf buf)
-
-
Method Detail
-
write
public int write(java.nio.ByteBuffer src)
- Specified by:
writein interfacejava.nio.channels.WritableByteChannel
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable
-
-