WritingTermSerializer

A JVM-only TermSerializer that can also write a Term directly to a java.io.Writer, e.g. to persist a term to a file or network stream without building the whole String in memory first.

See also

for the JVM-only reader-based counterpart.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val mimeType: MimeType

The textual format this serializer produces.

Functions

Link copied to clipboard
open fun serialize(value: Term): String

Serializes a single value into its textual representation in mimeType.

abstract fun serialize(writer: Writer, value: Term)

Serializes a single value, writing its textual representation to writer.

Link copied to clipboard
open fun serializeMany(values: Iterable<Term>): String
open fun serializeMany(values: Sequence<Term>): String
open fun serializeMany(vararg values: Term): String

Serializes several values into a single textual representation of all of them.

abstract fun serializeMany(writer: Writer, values: Iterable<Term>)
open fun serializeMany(writer: Writer, values: Sequence<Term>)
open fun serializeMany(writer: Writer, vararg values: Term)

Serializes several values, writing their textual representation to writer.