code: public synchronized int read(byte[] buf, int offset, int length) throws IOException
  	{
  		// if not on metadata, do the usual read so long as we
  		// don't read past metadata
  		if (bytesUntilNextMetadata > 0)
  		{
  			int adjLength = Math.min(length, bytesUntilNextMetadata);
  			int got = super.read(buf, offset, adjLength);
  			bytesUntilNextMetadata -= got;
  			return got;
  		}
  		else 
  		if (bytesUntilNextMetadata == 0)
  		{
  			// read/parse the metadata
  			readMetadata();
  			bytesUntilNextMetadata = metaint;
  			int adjLength = Math.min(length, bytesUntilNextMetadata);
  			int got = super.read(buf, offset, adjLength);
  			bytesUntilNextMetadata -= got;
  
  			return got;
  		}
  		else
  		{
  			return super.read(buf, offset, length);
  		}
  	}
docs: Reads a block of bytes.  If the next byte is known
  to be a block of metadata, then that is read, parsed,
  and stripped, and then a block of bytes is read and
  returned.
  Otherwise, it may read up to but
  not into the next metadata block if
  <code>bytesUntilNextMetadata &lt; length</code>