changeStream

fun changeStream(newStream: OutputStream)

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.