class NdjsonDecoder
source · line 6public
public class NdjsonDecoder public constructor(maxRecordBytes: Long = 1048576L) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
Incremental UTF-8 NDJSON record framing; JSON interpretation belongs to the caller.
function close
source · line 59public
public override fun close(): Unit
- Overrides
close
constructor constructor
source · line 6public
constructor(maxRecordBytes: Long = 1048576L)
parameter maxRecordBytes
source · line 6public
maxRecordBytes: Long = 1048576L
function nextRecord
source · line 42public
public fun nextRecord(): String?
Returns an exact record, including an empty string for an empty line.
property isFinished
source · line 15public
public val isFinished: Boolean
get: public read-only
getter get
source · line 15public
get(): Boolean
property failure
source · line 16public
public val failure: Throwable?
get: public read-only
getter get
source · line 16public
get(): Option<Throwable>
property isClosed
source · line 14public
public val isClosed: Boolean
get: public read-only
getter get
source · line 14public
get(): Boolean
function receive
source · line 19public
public fun receive(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Long
Consumes a prefix, stopping as soon as one record is ready to be removed.
parameter buffer
source · line 19public
buffer: NativeByteBuffer
parameter count
source · line 19public
count: Long = buffer.readableBytes
function endInput
source · line 50public
public fun endInput(): Unit
Delivers a final nonempty line even without a trailing LF; invalid UTF-8 still fails.