question: private static OutputStream wrapOutputStream ( final OutputStream stream ) { String os = System . getProperty ( "os.name" ) ; if ( os . startsWith ( "Windows" ) ) { try { return new WindowsAnsiOutputStream ( stream ) ; } catch ( Throwable ignore ) { } return new AnsiOutputStream ( stream ) ; } return stream ; }
target:  Returns an ansi output stream handler. We return whatever was passed if we determine we cannot handle ansi based on Kernel32 calls.