@ Override public void handleStream ( final InputStream inputStream ) { if ( executorService . isShutdown ( ) ) { throw new IllegalStateException ( "Cannot re-use " + this . getClass ( ) . getName ( ) ) ; } result . setFuture ( executorService . submit ( ( ) -> consumeBytes ( inputStream ) ) ) ; executorService . shutdown ( ) ; }
Handle an input stream on a separate thread .