public String convertToString(Object a) { if (a == null) { return null; } return StringConverter.byteArrayToHexString(((BlobData) a).getBytes()); }
public String convertToSQLString(Object a) { if (a == null) { return "NULL"; } return StringConverter.byteArrayToSQLHexString(((BinaryData) a).getBytes()); }
protected void writeOther(JavaObjectData o) { ensureRoom(o.getBytesLength() * 2 + 2); write('\''); StringConverter.writeHexBytes(getBuffer(), count, o.getBytes()); count += o.getBytesLength() * 2; write('\''); }
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('\''); }
protected void writeChar(String s, Type t) { write('\''); StringConverter.stringToUnicodeBytes(this, s, true); write('\''); }
public void writeString(String value) { StringConverter.stringToUnicodeBytes(this, value, false); }