Package com.swiftmq.impl.net.netty
Class CountableBufferedOutputStream
java.lang.Object
java.io.OutputStream
com.swiftmq.impl.net.netty.CountableBufferedOutputStream
- All Implemented Interfaces:
Countable
,Closeable
,Flushable
,AutoCloseable
-
Constructor Summary
ConstructorDescriptionCountableBufferedOutputStream
(ProtocolOutputHandler protocolOutputHandler, SocketChannel channel) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addByteCount
(long cnt) void
flush()
long
int
performWrite
(byte[] b, int offset, int len) void
void
write
(byte[] b, int offset, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
close, nullOutputStream, write
-
Constructor Details
-
CountableBufferedOutputStream
public CountableBufferedOutputStream(ProtocolOutputHandler protocolOutputHandler, SocketChannel channel)
-
-
Method Details
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
performWrite
- Throws:
IOException
-
addByteCount
public void addByteCount(long cnt) - Specified by:
addByteCount
in interfaceCountable
-
getByteCount
public long getByteCount()- Specified by:
getByteCount
in interfaceCountable
-
resetByteCount
public void resetByteCount()- Specified by:
resetByteCount
in interfaceCountable
-