private final class Http2Stream.FramingSource
extends java.lang.Object
implements okio.Source
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
closed
True if the caller has closed this stream.
|
(package private) boolean |
finished
True if either side has cleanly shut down this stream.
|
private long |
maxByteCount
Maximum number of bytes to buffer before reporting a flow control error.
|
private okio.Buffer |
readBuffer
Buffer with readable data.
|
private okio.Buffer |
receiveBuffer
Buffer to receive data from the network into.
|
| Constructor and Description |
|---|
FramingSource(long maxByteCount) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkNotClosed() |
void |
close() |
long |
read(okio.Buffer sink,
long byteCount) |
(package private) void |
receive(okio.BufferedSource in,
long byteCount) |
okio.Timeout |
timeout() |
private void |
waitUntilReadable()
Returns once the source is either readable or finished.
|
private final okio.Buffer receiveBuffer
private final okio.Buffer readBuffer
private final long maxByteCount
boolean closed
boolean finished
public long read(okio.Buffer sink,
long byteCount)
throws java.io.IOException
read in interface okio.Sourcejava.io.IOExceptionprivate void waitUntilReadable()
throws java.io.IOException
java.io.IOExceptionvoid receive(okio.BufferedSource in,
long byteCount)
throws java.io.IOException
java.io.IOExceptionpublic okio.Timeout timeout()
timeout in interface okio.Sourcepublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface okio.Sourcejava.io.IOExceptionprivate void checkNotClosed()
throws java.io.IOException
java.io.IOException