code: public static void skip(InputStream stream, long skip) throws IOException
     {
        long count = skip;
        while (count > 0)
        {
           count -= stream.skip(count);
        }
     }
docs: The documentation for InputStream.skip indicates that it can bail out early, and not skip
  the requested number of bytes. I've encountered this in practice, hence this helper method.
  
  @param stream InputStream instance
  @param skip number of bytes to skip