Class Snippet.Buffer.SnippetWriter

  • All Implemented Interfaces:
    Closeable, Flushable, Appendable, AutoCloseable, Buffered
    Enclosing class:
    Snippet.Buffer

    class Snippet.Buffer.SnippetWriter
    extends Snippet.PassthroughWriter
    implements Buffered
    Specialized Writer with three internal states: Writing, Completed, Truncated. When there is still space left for more json, the state will be Writing If the last write brought is exactly to the end of the max length, the state will be Completed. If the last write brought us over the max length, the state will be Truncated.