PgOutputStream

internal class PgOutputStream(outputStream: OutputStream)

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.

Constructors

Link copied to clipboard
constructor(outputStream: OutputStream)

Functions

Link copied to clipboard
fun changeStream(newStream: OutputStream)
Link copied to clipboard
fun flush()
Link copied to clipboard
fun writeByte(b: Byte)
Link copied to clipboard
fun writeBytes(bytes: ByteArray, offset: Int = 0, length: Int = bytes.size - offset)
Link copied to clipboard

Writes a null-terminated string.

Link copied to clipboard
fun writeInt(i: Int)
Link copied to clipboard
fun writeShort(s: Int)