protected int readBlocking(byte[] b, int off, int len) throws IOException {
		int ret = 0;
		int tlen = 0;
		while (len > 0 && (ret = in.read(b, off, len)) != -1) {
			tlen += ret;
			off += ret;
			len -= ret;
		}
		return tlen;
	}