protected void writeBinary(BinaryData o) {

    ensureRoom((int) (o.length(null) * 2 + 2));
    write('\'');
    StringConverter.writeHexBytes(getBuffer(), count, o.getBytes());

    count += (o.length(null) * 2);

    write('\'');
  }
  protected void writeBit(BinaryData o) {

    ensureRoom((int) (o.length(null) * 8 + 2));
    write('\'');

    String s = StringConverter.byteArrayToBitString(o.getBytes(), (int) o.bitLength(null));

    writeBytes(s);
    write('\'');
  }