code: private int readBytes(byte[] b, int offs, int len)
  		throws BitstreamException
  	{
  		int totalBytesRead = 0;
  		try
  		{
  			while (len > 0)
  			{
  				int bytesread = source.read(b, offs, len);
  				if (bytesread == -1)
  				{
  					break;
  				}
  				totalBytesRead += bytesread;
  				offs += bytesread;
  				len -= bytesread;
  			}
  		}
  		catch (IOException ex)
  		{
  			throw newBitstreamException(STREAM_ERROR, ex);
  		}
  		return totalBytesRead;
  	}
docs: Simlar to readFully, but doesn't throw exception when
  EOF is reached.