/** * Override because we must always create a new byte array */ @Override public byte[] toBytes(Object object, SortOrder sortOrder) { byte[] bytes = toBytes(object); // Override because we need to allocate a new buffer in this case if (sortOrder == SortOrder.DESC) { return SortOrder.invert(bytes, 0, new byte[bytes.length], 0, bytes.length); } return bytes; }
@Override public byte[] toBytes(Object object) { // Delegate to VARBINARY if (object == null) { throw newIllegalDataException(this + " may not be null"); } return PVarbinary.INSTANCE.toBytes(object); }
@Override public int toBytes(Object object, byte[] bytes, int offset) { if (object == null) { throw newIllegalDataException(this + " may not be null"); } return PVarbinary.INSTANCE.toBytes(object, bytes, offset); }
@Override public byte[] toBytes(Object object) { // Delegate to VARBINARY if (object == null) { throw newIllegalDataException(this + " may not be null"); } return PVarbinary.INSTANCE.toBytes(object); }
/** * Override because we must always create a new byte array */ @Override public byte[] toBytes(Object object, SortOrder sortOrder) { byte[] bytes = toBytes(object); // Override because we need to allocate a new buffer in this case if (sortOrder == SortOrder.DESC) { return SortOrder.invert(bytes, 0, new byte[bytes.length], 0, bytes.length); } return bytes; }
@Override public byte[] toBytes(Object object) { // Delegate to VARBINARY if (object == null) { throw newIllegalDataException(this + " may not be null"); } return PVarbinary.INSTANCE.toBytes(object); }
/** * Override because we must always create a new byte array */ @Override public byte[] toBytes(Object object, SortOrder sortOrder) { byte[] bytes = toBytes(object); // Override because we need to allocate a new buffer in this case if (sortOrder == SortOrder.DESC) { return SortOrder.invert(bytes, 0, new byte[bytes.length], 0, bytes.length); } return bytes; }
@Override public int toBytes(Object object, byte[] bytes, int offset) { if (object == null) { throw newIllegalDataException(this + " may not be null"); } return PVarbinary.INSTANCE.toBytes(object, bytes, offset); }
@Override public int toBytes(Object object, byte[] bytes, int offset) { if (object == null) { throw newIllegalDataException(this + " may not be null"); } return PVarbinary.INSTANCE.toBytes(object, bytes, offset); }