logger.error(new String(line, 0, remaining));
logger.error(msg);
  protected int readUnbuffered(byte[] buf, int off, int len) throws IOException {    int ret = 0;    int tag;    byte[] line = new byte[1024];    while (ret == 0)      {        if (remaining > 0)          {            len = Math.min(len, remaining);            ret = in.read(buf, off, len);            logger.debug("len=" + len + " ret=" + ret + " remaining=" + remaining);            off += ret;            remaining -= ret;            continue;          }        in.read(line, 0, 4);        tag = line[3] & 0xFF;        remaining  =  line[0] & 0xFF;        remaining |= (line[1] & 0xFF) <<  8;        remaining |= (line[2] & 0xFF) << 16;        logger.debug("bytes=" + Util.toHexString(line, 0, 4) +                     " tag=" + tag + " remaining=" + remaining);        if (tag == MPLEX_BASE)            continue;        tag -= MPLEX_BASE;        if (tag != FERROR && tag != FINFO)          {            throw new IOException("illegal tag " + tag);          }        if (remaining > line.length - 1)          {            logger.fatal("multiplexing overflow " + remaining);            throw new IOException("multiplexing overflow " + remaining);          }        in.read(line, 0, remaining);        if (tag == FERROR)          logger.error(new String(line, 0, remaining));        else          logger.info(new String(line, 0, remaining));        remaining = 0;      }    return ret;  }