Package org.aoju.bus.core.io.sink
Interface Sink
- All Superinterfaces:
AutoCloseable,Closeable,Flushable
- All Known Subinterfaces:
BufferSink
- All Known Implementing Classes:
AssignSink,Buffer,DeflaterSink,FaultHideSink,GzipSink,RealSink
接收一个字节流 使用这个接口可以在任何地方编写数据
需要:到网络、存储器或内存中的缓冲区 水槽可以分层
转换接收到的数据,如压缩、加密、节流或添加协议框架
BufferSink.outputStream()使一个接收器适应outputStream- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
-
Method Details
-
flush
- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
timeout
Timeout timeout() -
write
- Throws:
IOException
-