code: public static long discardStreamCount(InputStream is,int size) throws IOException {
  		long count = 0;
  		byte[] buffer = new byte[size];
  		int amt = 0;
  		while((amt = is.read(buffer, 0, size)) != -1) {
  			count += amt;
  		}
  		return count;
  	}
docs: throw away all bytes from stream argument, and count how many bytes were
  discarded before reaching the end of the stream.
  @param is InputStream to read and discard
  @param size number of bytes to read at once from the stream
  @return the number of bytes discarded
  @throws IOException when is throws one