Package org.aoju.bus.core.io.sink
Class RealSink
java.lang.Object
org.aoju.bus.core.io.sink.RealSink
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,Channel,WritableByteChannel,BufferSink,Sink
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuffer()voidclose()emit()voidflush()booleanisOpen()timeout()toString()write(byte[] source) write(byte[] source, int offset, int byteCount) intwrite(ByteBuffer source) voidwrite(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)
-
Field Details
-
buffer
-
sink
-
-
Constructor Details
-
RealSink
-
-
Method Details
-
buffer
- Specified by:
bufferin interfaceBufferSink
-
write
- Specified by:
writein interfaceSink- Throws:
IOException
-
write
- Specified by:
writein interfaceBufferSink- Throws:
IOException
-
writeUtf8
- Specified by:
writeUtf8in interfaceBufferSink- Throws:
IOException
-
writeUtf8
- Specified by:
writeUtf8in interfaceBufferSink- Throws:
IOException
-
writeUtf8CodePoint
- Specified by:
writeUtf8CodePointin interfaceBufferSink- Throws:
IOException
-
writeString
- Specified by:
writeStringin interfaceBufferSink- Throws:
IOException
-
writeString
public BufferSink writeString(String string, int beginIndex, int endIndex, Charset charset) throws IOException - Specified by:
writeStringin interfaceBufferSink- Throws:
IOException
-
write
- Specified by:
writein interfaceBufferSink- Throws:
IOException
-
write
- Specified by:
writein interfaceBufferSink- Throws:
IOException
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
writeAll
- Specified by:
writeAllin interfaceBufferSink- Throws:
IOException
-
write
- Specified by:
writein interfaceBufferSink- Throws:
IOException
-
writeByte
- Specified by:
writeBytein interfaceBufferSink- Throws:
IOException
-
writeShort
- Specified by:
writeShortin interfaceBufferSink- Throws:
IOException
-
writeShortLe
- Specified by:
writeShortLein interfaceBufferSink- Throws:
IOException
-
writeInt
- Specified by:
writeIntin interfaceBufferSink- Throws:
IOException
-
writeIntLe
- Specified by:
writeIntLein interfaceBufferSink- Throws:
IOException
-
writeLong
- Specified by:
writeLongin interfaceBufferSink- Throws:
IOException
-
writeLongLe
- Specified by:
writeLongLein interfaceBufferSink- Throws:
IOException
-
writeDecimalLong
- Specified by:
writeDecimalLongin interfaceBufferSink- Throws:
IOException
-
writeHexadecimalUnsignedLong
- Specified by:
writeHexadecimalUnsignedLongin interfaceBufferSink- Throws:
IOException
-
emitCompleteSegments
- Specified by:
emitCompleteSegmentsin interfaceBufferSink- Throws:
IOException
-
emit
- Specified by:
emitin interfaceBufferSink- Throws:
IOException
-
outputStream
- Specified by:
outputStreamin interfaceBufferSink
-
flush
- Specified by:
flushin interfaceBufferSink- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceSink- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
public void close() -
timeout
-
toString
-