if (wavail > 0)
if (wavail <= 0)
  public int read(char buf[], int offset, int length) throws IOException  {    synchronized (lock)      {	if (in == null)	  throw new IOException("Stream closed");	int wavail = wcount - wpos;	if (wavail > 0)	  {	    if (length > wavail)	      length = wavail;	    System.arraycopy(work, wpos, buf, offset, length);	    wpos += length;	    return length;	  }	else	  {	    if (length == 0)	      return 0;	    for (;;)	      {		in.mark(1);		int b = in.read();		if (b < 0)		  return -1;		in.reset();		converter.setInput(in.buf, in.pos, in.count);		int count = converter.read (buf, offset, length);		in.skip(converter.inpos - in.pos);		if (count > 0)		  return count;	      }	  }      }  }