Interface JsonLinesWriter

All Superinterfaces:
AutoCloseable

public interface JsonLinesWriter extends AutoCloseable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    Flushes any buffered data to the underlying output.
    void
    write(Iterable<?> objects)
    Writes multiple objects as JSON lines.
    void
    write(Object object)
    Writes a single object as a JSON line.
  • Method Details

    • write

      void write(Object object) throws IOException
      Writes a single object as a JSON line.
      Parameters:
      object - the object to serialize and write
      Throws:
      IOException - if an I/O error occurs
    • write

      void write(Iterable<?> objects) throws IOException
      Writes multiple objects as JSON lines.
      Parameters:
      objects - the objects to serialize and write
      Throws:
      IOException - if an I/O error occurs
    • flush

      void flush() throws IOException
      Flushes any buffered data to the underlying output.
      Throws:
      IOException - if an I/O error occurs
    • close

      void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException