Class TerminalWriter

    • Constructor Detail

      • TerminalWriter

        public TerminalWriter​(Writer out)
      • TerminalWriter

        public TerminalWriter​(Writer out,
                              boolean autoFlush)
    • Method Detail

      • isSupported

        public static boolean isSupported()
      • progressOutput

        public static String progressOutput​(String lastVerboseString,
                                            String newVerboseString,
                                            PrintStream out)
        (Over)writes a progress line to the given PrintStream. Any extra characters from previous output are covered with spaces. Any common prefix is not overwritten.
        Parameters:
        lastVerboseString - The last line output
        newVerboseString - The new line to display
        Returns:
        The new line (newVerboseString)
      • progressOutput

        public static String progressOutput​(String lastVerboseString,
                                            String newVerboseString,
                                            Writer out)
                                     throws IOException
        (Over)writes a progress line to the given PrintStream. Any extra characters from previous output are covered with spaces. Any common prefix is not overwritten.
        Parameters:
        lastVerboseString - The last line output
        newVerboseString - The new line to display
        Returns:
        The new line (newVerboseString)
        Throws:
        IOException
      • isNoClose

        public boolean isNoClose()
        Specified by:
        isNoClose in interface NoClose
      • isEnabled

        public boolean isEnabled()
      • setEnabled

        public void setEnabled​(boolean enabled)
        Enables the special features of the terminal writer.