public int read(byte b[], int off, int len) throws IOException { int result; int left = len; result = readData(b, off, len); while (true) { if (result == -1) return -1; position += result; if (result == left) return len; left -= result; off += result; result = readData(b, off, left); }
public int read() throws IOException { if (buf == null) throw new IOException(); position++; if (pos < buf.length) return (buf[pos++] & 0xFF); return in.read();
	public int read(byte b[], int off, int len) throws IOException {		int result;		int left = len;		result = readData(b, off, len);		while (true) {			if (result == -1) return -1;			position += result;			if (result == left) return len;			left -= result;			off += result;			result = readData(b, off, left);		}	}