this.stream = stream; this.startingPos = stream.getStreamPosition(); this.startingLength = this.length = length;
return startingLength;
if (length == 0) { // Local EOF return -1; } else { --length; return stream.read(); }
if (length == 0) { // Local EOF return -1; } len = Math.min(len, length); int bytes = stream.read(b, off, len); length -= bytes; return bytes;
stream.seek(pos - startingPos); streamPos = pos;