public static void discardBytes(InputStream stream, int length) throws IOException {
    if (stream.skip(length) != length) {
      throw new IOException("premature end of stream");
    }
  }
public static void discardBytes(InputStream stream, int length)