Package org.fressian

Interface StreamingWriter

All Known Implementing Classes:
FressianWriter

public interface StreamingWriter
  • Method Summary

    Modifier and Type
    Method
    Description
    Begin a variable-length closed list.
    Begin a variable-length open list.
    Mark the end of a variable-lenght list, either closed or open.
    void
    Write a footer for some existing fressianed data (the readable portion of bb.) For advanced use when building a larger fressianed stream from existing content.
  • Method Details

    • beginClosedList

      Writer beginClosedList() throws IOException
      Begin a variable-length closed list. This allows you (the writer) to write very large things, or things of unknown size, without having to place them in a collection first. However, you must remember to call endList when you are done, or the resulting stream will not be readable.
      Returns:
      this Writer (fluent)
      Throws:
      IOException
    • endList

      Writer endList() throws IOException
      Mark the end of a variable-lenght list, either closed or open.
      Returns:
      this Writer (fluent)
      Throws:
      IOException
    • beginOpenList

      Writer beginOpenList() throws IOException
      Begin a variable-length open list. An open list can be terminated either by a call to endList, *or* by an end of stream. Using an open is much more subtle than either a fixed or closed variable list. Avoid it if either other choice can work.
      Returns:
      this Writer (fluent)
      Throws:
      IOException
    • writeFooterFor

      void writeFooterFor(ByteBuffer bb) throws IOException
      Write a footer for some existing fressianed data (the readable portion of bb.) For advanced use when building a larger fressianed stream from existing content.
      Parameters:
      bb -
      Throws:
      IOException