Interface OutputCursor

All Superinterfaces:
AutoCloseable

public interface OutputCursor extends AutoCloseable
A cursor for manually writing data to a given Output format. Obtaining a cursor from an Output is ideal when you are pulling or generating records from disparate sources and need precise control over writing to the the output stream. If you don't need manual control, consider calling Output.write(Target, Iterable) instead.
Author:
jbanes
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(JSONObject record)
    Write a single record to the output stream
    default void
    Write a stream of data to the output stream.
    default void
    Write a stream of data to the output stream.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • write

      void write(JSONObject record)
      Write a single record to the output stream
      Parameters:
      record - the JSONObject to write
    • write

      default void write(Iterable<JSONObject> iterable)
      Write a stream of data to the output stream. This call does not close the cursor and can be called repeatedly as needed.
      Parameters:
      iterable - a stream a data to write
    • write

      default void write(Iterator<JSONObject> iterator)
      Write a stream of data to the output stream. This call does not close the cursor and can be called repeatedly as needed.
      Parameters:
      iterator - a stream a data to write