PersistentOutputStream

A specialized implementation of a DataOutputStream that extends its capabilities to provide persistent storage for complex data types through the PersistentOutput interface.

PersistentOutputStream enables writing complex data types to an underlying output stream by using a PersistentDataType, which facilitates the conversion of complex types to primitive types suitable for storage.

This class integrates functionality for seamless serialization of data using a standard output stream, ensuring efficient and structured handling of both primitive and complex data.

Parameters

out

the underlying OutputStream to which data will be written

See also

Constructors

Link copied to clipboard
constructor(out: OutputStream)

Creates a PersistentOutputStream that wraps the provided output stream.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun flush()
Link copied to clipboard
fun size(): Int
Link copied to clipboard
open override fun write(p0: Int)
open override fun write(p0: ByteArray, p1: Int, p2: Int)
open override fun write(p0: ByteArray)
Link copied to clipboard
override fun writeBoolean(p0: Boolean)
Link copied to clipboard
override fun writeByte(p0: Int)
Link copied to clipboard
override fun writeBytes(p0: String)
Link copied to clipboard
override fun writeChar(p0: Int)
Link copied to clipboard
override fun writeChars(p0: String)
Link copied to clipboard
open override fun <P : Any, C : Any> writeData(type: PersistentDataType<P, C>, data: C)

Writes data of a specific type to the output stream using the provided PersistentDataType.

Link copied to clipboard
override fun writeDouble(p0: Double)
Link copied to clipboard
override fun writeFloat(p0: Float)
Link copied to clipboard
override fun writeInt(p0: Int)
Link copied to clipboard
override fun writeLong(p0: Long)
Link copied to clipboard
override fun writeShort(p0: Int)
Link copied to clipboard
override fun writeUTF(p0: String)