SdkBuffer 
    A collection of bytes in memory. Moving data from one buffer to another is fast.
Thread Safety Buffer is NOT thread safe and should not be shared between threads without external synchronization.
Functions
Closes this source and releases any resources held. It is an error to read from a closed source. This is an idempotent operation.
Closes this source and releases any resources held. It is an error to read from a closed source. This is an idempotent operation.
Writes all buffered data to the underlying sink. Like flush, but weaker (ensures data is pushed to the underlying sink but not necessarily all the way down the chain like flush does). Call before this sink goes out of scope to ensure any buffered data eventually gets to its final destination
Writes all buffered data to the underlying sink. Like flush, but weaker (ensures data is pushed to the underlying sink but not necessarily all the way down the chain like flush does). Call before this sink goes out of scope to ensure any buffered data eventually gets to its final destination
Writes all buffered data to the underlying sink. Like flush, but weaker (ensures data is pushed to the underlying sink but not necessarily all the way down the chain like flush does). Call before this sink goes out of scope to ensure any buffered data eventually gets to its final destination
Returns true if there are no more bytes in this source. This will block until there are bytes to read or the source is definitely exhausted.
Returns true if there are no more bytes in this source. This will block until there are bytes to read or the source is definitely exhausted.
Writes all buffered data to the underlying sink and pushes it recursively all the way to its final destination.
Writes all buffered data to the underlying sink.
Pushes all buffered bytes to their final destination
Get an input stream that reads from this source
Return an output stream that writes to this sink
Returns a new SdkBufferedSource that can read data from this source without consuming it. The returned source becomes invalid once this source is next read or closed.
Returns a new SdkBufferedSource that can read data from this source without consuming it. The returned source becomes invalid once this source is next read or closed.
Returns a new SdkBufferedSource that can read data from this source without consuming it. The returned source becomes invalid once this source is next read or closed.
Reads all bytes from this source and returns them as a byte array
Reads byteCount bytes from this source and returns them as a byte array
Reads all bytes from this source and returns them as a byte array
Reads byteCount bytes from this source and returns them as a byte array
Reads all bytes from this source and returns them as a byte array
Reads byteCount bytes from this source and returns them as a byte array
Read four bytes from this source and returns a big-endian int.
Read four bytes in big-endian order from this source and returns them as an int.
Read four bytes from this source and returns a little-endian int.
Read four bytes in little-endian order from this source and returns them as an int.
Read four bytes from this source and returns a big-endian long.
Read eight bytes in big-endian order from this source and returns them as a long.
Read four bytes from this source and returns a little-endian long.
Read eight bytes in little-endian order from this source and returns them as a long.
Read four bytes from this source and returns a little-endian long.
Read two bytes from this source and returns a big-endian short.
Read two bytes in big-endian order from this source and returns them as a short.
Read two bytes from this source and returns it as a little-endian short.
Read two bytes in little-endian order from this source and returns them as a short.
Read two bytes from this source and returns it as a little-endian short.
Reads all bytes from this source, decodes them as UTF-8, and returns the string.
Reads byteCount bytes from this source, decodes them as UTF-8, and returns the string.
Reads all bytes from this source, decodes them as UTF-8, and returns the string.
Reads byteCount bytes from this source, decodes them as UTF-8, and returns the string.
Returns when the buffer contains at least byteCount bytes or throws EOFException if the source is exhausted before the requested number of bytes could be read
Returns when the buffer contains at least byteCount bytes or throws EOFException if the source is exhausted before the requested number of bytes could be read
Returns when the buffer contains at least byteCount bytes or throws EOFException if the source is exhausted before the requested number of bytes could be read
Discards byteCount bytes from this source. Throws IOException if source is exhausted before byteCount bytes can be discarded.
Discards byteCount bytes from this source. Throws IOException if source is exhausted before byteCount bytes can be discarded.
Discards byteCount bytes from this source. Throws IOException if source is exhausted before byteCount bytes can be discarded.
Write all bytes from source to this sink.
Write string as UTF-8 encoded bytes to this sink starting at start index up to endExclusive index.
Write UTF8-bytes of string to this sink starting at start index up to endExclusive index.
Inherited functions
Returns a new sink that buffers writes to the sink. Writes will be efficiently "batched". Call SdkSink.flush when done to emit all data to the underlying sink.
Returns a new source that buffers reads from the underlying source. The returned source will perform bulk reads to an in-memory buffer making small reads efficient.