PgOutputStream
A highly optimized, buffered output stream tailored for the PostgreSQL wire protocol.
It provides specialized methods for efficiently writing protocol primitives like bytes, integers, shorts, and null-terminated C-style strings. Internal buffering minimizes the number of underlying network write operations.
Functions
Swaps the underlying stream, flushing what is buffered first so nothing written before the swap is lost. The read side discards instead; see PgInputStream.changeStream.
Writes a null-terminated string already encoded, for a message that needed its bytes to count its length.
Writes a null-terminated string.
Buffers an unsigned 16-bit integer, most significant byte first - taken as an Int because the protocol's counts run to 65535 and a Short would make half of them negative.