code: private static void skipStream(InputStream in, long count) throws IOException {
          long size = count;
          long skipped = 0;
          while (size > 0 && skipped >= 0) {
              skipped = in.skip(size);
              if (skipped != -1) {
                  size -= skipped;
              }
          }
      }
docs: Skips the given number of bytes from the specified input stream.
  
  @param in
  the input stream
  @param count
  the number of bytes to skip
  @throws IOException
  if an IO error occurs