bytesin = left;
sublen = length;
  public int gzwrite(Env env,		     InputStream is, int length )  {    if ((_fileValue == null) || (_fileValue == BooleanValue.FALSE)) {      env.warning(L.l("file could not be open for writing"));      return -1;    }    // default size that would have been allocated by ByteBuffer    byte[] buffer = new byte[32];    int inputSize = 0;    int bytesin = 0;    try {      if( length == 0 ) {        for (bytesin=is.read(buffer, 0, buffer.length); bytesin > 0; bytesin=is.read(buffer, 0, buffer.length)) {          _gout.write(buffer, 0, bytesin);          inputSize += bytesin;        }      }      else {        for (int left = length; left > 0; left -= bytesin ) {          if (buffer.length < left)            bytesin = buffer.length;          else            bytesin = left;          bytesin = is.read(buffer, 0, bytesin);          if (bytesin <= 0)            break;          _gout.write(buffer, 0, bytesin);          inputSize += bytesin;        }      }    }    catch (IOException e) {      log.log(Level.FINE, e.getMessage(), e);      env.warning(L.l(e.getMessage()));    }    return inputSize;  }