code: public static void skip(InputStream is) throws IOException {
          while (is.available() > 0) {
              is.skip(Long.MAX_VALUE);
          }
          is.close();
      }
docs: Skips the content of the stream as long as there is data available. Afterwards, the stream is closed.
  
  @param is
  the input stream.
  
  @throws IOException
  if an I/O error occurs.