Package io.grpc.internal
Class MessageFramer.BufferChainOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- io.grpc.internal.MessageFramer.BufferChainOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- MessageFramer
private final class MessageFramer.BufferChainOutputStream extends java.io.OutputStreamProduce a collection ofWritableBufferinstances from the data written to anOutputStream.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<WritableBuffer>bufferListprivate WritableBuffercurrent
-
Constructor Summary
Constructors Modifier Constructor Description privateBufferChainOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private intreadableBytes()voidwrite(byte[] b, int off, int len)voidwrite(int b)This is slow, don't call it.
-
-
-
Field Detail
-
bufferList
private final java.util.List<WritableBuffer> bufferList
-
current
private WritableBuffer current
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOExceptionThis is slow, don't call it. If you care about write overhead, use a BufferedOutputStream. Better yet, you can use your own single byte buffer and callwrite(byte[], int, int).- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len)- Overrides:
writein classjava.io.OutputStream
-
readableBytes
private int readableBytes()
-
-