Interface Output

All Known Implementing Classes:
CSVOutput, DelimitedOutput, JBINOutput, JSONOutput, PipeDelimitedOutput, TabDelimitedOutput

public interface Output
Interface for writing file formats from an Iterable stream of data
Author:
jbanes
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Provides the MIME type for the data format produced by this implementation.
    write(Target target)
    Opens a stream returns a cursor to write data to the specified target
    default void
    write(Target target, Iterable<JSONObject> records)
    Writes a stream of data to the specified target
  • Method Details

    • write

      OutputCursor write(Target target)
      Opens a stream returns a cursor to write data to the specified target
      Parameters:
      target - the target to write to
      Returns:
      an OutputCursor to which data can be written
    • write

      default void write(Target target, Iterable<JSONObject> records)
      Writes a stream of data to the specified target
      Parameters:
      target - The target to write to.
      records - a stream of data
      Throws:
      ConvirganceException - If an error occurs while writing to the target.
    • getContentType

      default String getContentType()
      Provides the MIME type for the data format produced by this implementation. If not set by the implementation, "application/octet" will be returned.
      Returns:
      The MIME type for the data format