Interface RecordReadable

All Known Subinterfaces:
TokenReadable
All Known Implementing Classes:
BsonParser, BsonParser.Base64, BsonParser.SpacedHex, BsonParserSession, CborParser, CborParser.Base64, CborParser.SpacedHex, CborParserSession, CsvParser, CsvParserSession, HjsonParser, HjsonParserSession, HoconParser, HoconParserSession, HtmlParser, HtmlParserSession, IniParser, IniParserSession, Json5lParser, Json5lParserSession, Json5Parser, Json5ParserSession, JsonlParser, JsonlParserSession, JsonParser, JsonParserSession, MarkdownDocParser, MarkdownDocParserSession, MarkdownParser, MarkdownParserSession, MsgPackParser, MsgPackParser.Base64, MsgPackParser.SpacedHex, MsgPackParserSession, OpenApiParser, OpenApiParserSession, ParquetParser, ParquetParserSession, PlainTextParser, PlainTextParserSession, SseParser, SseParserSession, TomlParser, TomlParserSession, UonParser, UonParser.Decoding, UonParserSession, UrlEncodingParser, UrlEncodingParserSession, XmlParser, XmlParserSession, YamlParser, YamlParserSession

public interface RecordReadable
Capability role for objects that can open a whole-value RecordReader cursor.

Implemented at both levels of the parser surface:

  • the convenience Parser subclass (the object REST negotiation matches on) — a thin delegator that mirrors read(...) by forwarding to getSession().readRecords(input);
  • the ParserSession subclass (where the live BeanSession/MarshallingContext is) — the real cursor creation.

Capability is detected via instanceof: a parser supports the record-streaming surface exactly when it is an instance of this interface. There is no separate capability enum or marker interface.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Streaming-quality signal queryable before opening a cursor.
    Opens a low-level RecordReader cursor over the specified input.
  • Method Details

    • readRecords

      Opens a low-level RecordReader cursor over the specified input.

      When invoked on a convenience Parser the cursor is opened with default session args (mirroring read(...)). Callers that need request-derived configuration (locale, timezone, schema, swaps) should instead call createSession(args).build() and invoke this method on the resulting ParserSession (which is also a RecordReadable).

      Parameters:
      input - The input. Subtypes define the supported types (typically Reader / CharSequence / InputStream / byte[] / File).
      Returns:
      A new RecordReader cursor.
      Throws:
      IOException - If a problem occurred reading the underlying input.
    • isRecordStreaming

      default boolean isRecordStreaming()
      Streaming-quality signal queryable before opening a cursor.
      Returns:
      true if readRecords(Object) returns an O(1)-memory streaming cursor; false for buffered (whole-value) formats backed by RecordAdapter.