Package org.aoju.bus.core.io
Interface BufferSink
- All Superinterfaces:
AutoCloseable,Channel,Closeable,Flushable,Sink,WritableByteChannel
一种接收器,它在内部保存缓冲区,
以便调用者可以进行小的写操作没有性能损失
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionbuffer()emit()voidflush()write(byte[] source) write(byte[] source, int offset, int byteCount) write(ByteString byteString) longwriteByte(int b) writeDecimalLong(long v) writeHexadecimalUnsignedLong(long v) writeInt(int i) writeIntLe(int i) writeLong(long v) writeLongLe(long v) writeShort(int s) writeShortLe(int s) writeString(String string, int beginIndex, int endIndex, Charset charset) writeString(String string, Charset charset) writeUtf8CodePoint(int codePoint) Methods inherited from interface java.nio.channels.WritableByteChannel
write
-
Method Details
-
buffer
Buffer buffer() -
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
writeAll
- Throws:
IOException
-
write
- Throws:
IOException
-
writeUtf8
- Throws:
IOException
-
writeUtf8
- Throws:
IOException
-
writeUtf8CodePoint
- Throws:
IOException
-
writeString
- Throws:
IOException
-
writeString
BufferSink writeString(String string, int beginIndex, int endIndex, Charset charset) throws IOException - Throws:
IOException
-
writeByte
- Throws:
IOException
-
writeShort
- Throws:
IOException
-
writeShortLe
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
writeIntLe
- Throws:
IOException
-
writeLong
- Throws:
IOException
-
writeLongLe
- Throws:
IOException
-
writeDecimalLong
- Throws:
IOException
-
writeHexadecimalUnsignedLong
- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceSink- Throws:
IOException
-
emit
- Throws:
IOException
-
emitCompleteSegments
- Throws:
IOException
-
outputStream
OutputStream outputStream()
-