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.OutputStream
Produce a collection ofWritableBuffer
instances from the data written to anOutputStream
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<WritableBuffer>
bufferList
private WritableBuffer
current
-
Constructor Summary
Constructors Modifier Constructor Description private
BufferChainOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
readableBytes()
void
write(byte[] b, int off, int len)
void
write(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.IOException
This 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:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len)
- Overrides:
write
in classjava.io.OutputStream
-
readableBytes
private int readableBytes()
-
-