public void flushInputStream(byte buf[], int len) throws IOException {
		int i = 0;
		if (closed) {
			return;
		}
		int k;
		for (; len > 0; len -= k) {
			k = inputStream.read(buf, i, len);
			if (k <= 0) {
				throw new IOException("EOF");
			}
			i += k;
		}
	}