public static Thread pipeAsynchronously ( final InputStream is , final ErrorHandler errorHandler , final boolean closeResources , final OutputStream ... os ) { Thread t = new Thread ( ) { @ Override public void run ( ) { try { pipeSynchronously ( is , closeResources , os ) ; } catch ( Throwable th ) { if ( errorHandler != null ) { errorHandler . onThrowable ( th ) ; } } } } ; t . setDaemon ( true ) ; t . start ( ) ; return t ; }
Asynchronous writing from is to os