checkBufferSize(1);
    public void writeTyped(int type, Xdrable item) throws IOException {        int size;        if (item == null) {            writeInt(1);            buf[count++] = (byte) type; //e.g. gds.isc_tpb_version3            size = 1;        }        else {            size = item.getLength() + 1;            writeInt(size);            buf[count++] = (byte) type; //e.g. gds.isc_tpb_version3            item.write(this);        }        count += (4 - size) & 3;    }