public static void discardStream ( InputStream is , int size ) throws IOException { byte [ ] buffer = new byte [ size ] ; while ( is . read ( buffer , 0 , size ) != - 1 ) { } }
throw away all bytes from stream argument