public int getObjectSize(final String object, final Object... hints) {
return object.length() * 2 + OIntegerSerializer.INT_SIZE;
}
public void serialize(final String object, final byte[] stream, final int startPosition, Object... hints) {
final OCharSerializer charSerializer = OCharSerializer.INSTANCE;
final int length = object.length();
OIntegerSerializer.INSTANCE.serializeLiteral(length, stream, startPosition);
for (int i = 0; i < length; i++) {
charSerializer.serializeLiteral(object.charAt(i), stream, startPosition + OIntegerSerializer.INT_SIZE + i * 2);
}
}