if (len == 0) return 0; if (crc == null) throw new IOException("Stream closed."); if (entry == null)
byte[] b = new byte[1]; if (read(b, 0, 1) <= 0)
  public int read(byte[] b, int off, int len) throws IOException  {    if (len == 0)      return 0;		if (crc == null)			throw new IOException("Stream closed.");		if (entry == null)			return -1;		boolean finished = false;    switch (method)      {      case ZipOutputStream.DEFLATED:				len = super.read(b, off, len);	if (len < 0)	  {					if (!inf.finished())						throw new ZipException("Inflater not finished!?");					avail = inf.getRemaining();					if ((flags & 8) != 0)						readDataDescr();	    if (inf.getTotalIn() != csize		|| inf.getTotalOut() != size)	      throw new ZipException("size mismatch: "+csize+";"+size+" <-> "+inf.getTotalIn()+";"+inf.getTotalOut());					inf.reset();					finished = true;				}				break;      case ZipOutputStream.STORED:				if (len > csize && csize >= 0)					len = csize;				len = readBuf(b, off, len);	if (len > 0)	  {					csize -= len;					size -= len;				}				if (csize == 0)					finished = true;				else if (len < 0)					throw new ZipException("EOF in stored block");				break;		}		if (len > 0)			crc.update(b, off, len);    if (finished)      {	if ((crc.getValue() & 0xffffffffL) != entry.getCrc())	  throw new ZipException("CRC mismatch");			crc.reset();			entry = null;			entryAtEOF = true;		}		return len;	}