checkBufferSize(1);
    public void writeSet(int type, byte[] s) throws IOException {        if (s == null) {            writeInt(1);            buf[count++] = (byte) type; //e.g. gds.isc_tpb_version3        }        else {            int len = s.length;            writeInt(len + 1);            buf[count++] = (byte) type;            write(s, len, (4 - (len+1)) & 3);        }    }