BufferedSink
A sink that keeps a buffer internally so that callers can do small writes without a performance penalty.
Inheritors
A sink that keeps a buffer internally so that callers can do small writes without a performance penalty.
Inheritors
A sink that keeps a buffer internally so that callers can do small writes without a performance penalty.
Inheritors
Properties
Functions
Returns a new sink that buffers writes to this. The returned sink will batch writes to this. Use this wherever you write to a sink to get an ergonomic and efficient access to data.
Pushes all buffered bytes to their final destination and releases the resources held by this sink. It is an error to write a closed sink. It is safe to close a sink more than once.
Pushes all buffered bytes to their final destination and releases the resources held by this sink. It is an error to write a closed sink. It is safe to close a sink more than once.
Closes this object and releases the resources it holds. It is an error to use an object after it has been closed. It is safe to close an object more than once.
Returns an DeflaterSink that DEFLATE-compresses data to this Sink while writing.
Writes all buffered data to the underlying sink, if one exists. Like flush, but weaker. Call this before this buffered sink goes out of scope so that its data can reach its destination.
Writes all buffered data to the underlying sink, if one exists. Like flush, but weaker. Call this before this buffered sink goes out of scope so that its data can reach its destination.
Writes all buffered data to the underlying sink, if one exists. Like flush, but weaker. Call this before this buffered sink goes out of scope so that its data can reach its destination.
Writes complete segments to the underlying sink, if one exists. Like flush, but weaker. Use this to limit the memory held in the buffer to a single segment. Typically application code will not need to call this: it is only necessary when application code writes directly to this sink's buffer.
Writes complete segments to the underlying sink, if one exists. Like flush, but weaker. Use this to limit the memory held in the buffer to a single segment. Typically application code will not need to call this: it is only necessary when application code writes directly to this sink's buffer.
Writes complete segments to the underlying sink, if one exists. Like flush, but weaker. Use this to limit the memory held in the buffer to a single segment. Typically application code will not need to call this: it is only necessary when application code writes directly to this sink's buffer.
Writes all buffered data to the underlying sink, if one exists. Then that sink is recursively flushed which pushes data as far as possible towards its ultimate destination. Typically that destination is a network socket or file.
Pushes all buffered bytes to their final destination.
Pushes all buffered bytes to their final destination.
Returns an output stream that writes to this sink.
Returns an appendable that encodes strings as UTF-8 and writes them to this sink.
Like OutputStream.write, this writes a complete byte array to this sink.
Removes byteCount bytes from source and appends them to this sink.
Like OutputStream.write, this writes byteCount bytes of source, starting at offset.
Removes byteCount bytes from source and appends them to this.
Like OutputStream.write, this writes a complete byte array to this sink.
Removes byteCount bytes from source and appends them to this sink.
Like OutputStream.write, this writes byteCount bytes of source, starting at offset.
Removes byteCount bytes from source and appends them to this.
Like OutputStream.write, this writes a complete byte array to this sink.
Removes byteCount bytes from source and appends them to this sink.
Like OutputStream.write, this writes byteCount bytes of source, starting at offset.
Removes byteCount bytes from source and appends them to this.
Removes all bytes from source and appends them to this sink. Returns the number of bytes read which will be 0 if source is exhausted.
Removes all bytes from source and appends them to this sink. Returns the number of bytes read which will be 0 if source is exhausted.
Writes a byte to this sink.
Writes a byte to this sink.
Writes a byte to this sink.
Writes a long to this sink in signed decimal form (i.e., as a string in base 10).
Writes a long to this sink in signed decimal form (i.e., as a string in base 10).
Writes a long to this sink in signed decimal form (i.e., as a string in base 10).
Writes a long to this sink in hexadecimal form (i.e., as a string in base 16).
Writes a long to this sink in hexadecimal form (i.e., as a string in base 16).
Writes a long to this sink in hexadecimal form (i.e., as a string in base 16).
Writes a big-endian int to this sink using four bytes.
Writes a big-endian int to this sink using four bytes.
Writes a big-endian int to this sink using four bytes.
Writes a little-endian int to this sink using four bytes.
Writes a little-endian int to this sink using four bytes.
Writes a little-endian int to this sink using four bytes.
Writes a big-endian long to this sink using eight bytes.
Writes a big-endian long to this sink using eight bytes.
Writes a big-endian long to this sink using eight bytes.
Writes a little-endian long to this sink using eight bytes.
Writes a little-endian long to this sink using eight bytes.
Writes a little-endian long to this sink using eight bytes.
Writes a big-endian short to this sink using two bytes.
Writes a big-endian short to this sink using two bytes.
Writes a big-endian short to this sink using two bytes.
Writes a little-endian short to this sink using two bytes.
Writes a little-endian short to this sink using two bytes.
Writes a little-endian short to this sink using two bytes.
Encodes string in UTF-8 and writes it to this sink.
Encodes the characters at beginIndex up to endIndex from string in UTF-8 and writes it to this sink.
Encodes string in UTF-8 and writes it to this sink.
Encodes the characters at beginIndex up to endIndex from string in UTF-8 and writes it to this sink.
Encodes string in UTF-8 and writes it to this sink.
Encodes the characters at beginIndex up to endIndex from string in UTF-8 and writes it to this sink.
Encodes codePoint in UTF-8 and writes it to this sink.
Encodes codePoint in UTF-8 and writes it to this sink.
Encodes codePoint in UTF-8 and writes it to this sink.