Package org.fressian

Interface StreamingWriter

  • All Known Implementing Classes:
    FressianWriter

    public interface StreamingWriter
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Writer beginClosedList()
      Begin a variable-length closed list.
      Writer beginOpenList()
      Begin a variable-length open list.
      Writer endList()
      Mark the end of a variable-lenght list, either closed or open.
      void writeFooterFor​(java.nio.ByteBuffer bb)
      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 Detail

      • beginClosedList

        Writer beginClosedList()
                        throws java.io.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:
        java.io.IOException
      • endList

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

        Writer beginOpenList()
                      throws java.io.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:
        java.io.IOException
      • writeFooterFor

        void writeFooterFor​(java.nio.ByteBuffer bb)
                     throws java.io.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:
        java.io.IOException