Class PrettifyOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public final class PrettifyOutputStream
    extends java.io.OutputStream
    • Field Detail

      • WHITESPACE

        private static final boolean[] WHITESPACE
      • out

        private final java.io.OutputStream out
      • indentLength

        private final int indentLength
      • currentIndent

        private int currentIndent
      • inString

        private boolean inString
      • inEscape

        private boolean inEscape
      • beginObjectOrList

        private boolean beginObjectOrList
    • Constructor Detail

      • PrettifyOutputStream

        public PrettifyOutputStream​(java.io.OutputStream out)
    • Method Detail

      • write

        public final void write​(byte[] bytes,
                                int off,
                                int len)
                         throws java.io.IOException
        Overrides:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • write

        public final void write​(int b)
                         throws java.io.IOException
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • writeNewLineWithIndent

        private void writeNewLineWithIndent()
                                     throws java.io.IOException
        Throws:
        java.io.IOException