Package org.miaixz.bus.core.io.sink
Class AssignSink
java.lang.Object
org.miaixz.bus.core.io.sink.AssignSink
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,Sink
- Direct Known Subclasses:
FaultHideSink
将调用转发给另一个调用的
Sink- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Pushes all buffered bytes to their final destination and releases the resources held by this sink.final Sinkdelegate()voidflush()Pushes all buffered bytes to their final destination.timeout()Returns the timeout for this sink.toString()voidRemovesbyteCountbytes fromsourceand appends them to this.
-
Constructor Details
-
AssignSink
-
-
Method Details
-
delegate
-
write
Description copied from interface:SinkRemovesbyteCountbytes fromsourceand appends them to this.- Specified by:
writein interfaceSink- Throws:
IOException
-
flush
Description copied from interface:SinkPushes all buffered bytes to their final destination.- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceSink- Throws:
IOException
-
timeout
Description copied from interface:SinkReturns the timeout for this sink. -
close
Description copied from interface:SinkPushes all buffered bytes to their final destination and releases the resources held by this sink. It is an error to write a closed sink. It is safe to close a sink more than once.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSink- Throws:
IOException
-
toString
-