PgpIo

object PgpIo

Size-limited stream copy and read utilities.

Properties

Link copied to clipboard

Maximum bytes allowed when reading or copying streams (64 MiB).

Functions

Link copied to clipboard
fun copyLimited(input: InputStream, output: OutputStream, maxBytes: Long = MAX_STREAM_BYTES): Long

Copies input to output up to maxBytes.

Link copied to clipboard
fun readLimited(input: InputStream, maxBytes: Long = MAX_STREAM_BYTES): ByteArray

Reads all bytes from input up to maxBytes.