/** * Get or create a bytes value for the given byte array. * Clone the data. * * @param b the byte array * @return the value */ public static ValueBytes get(byte[] b) { if (b.length == 0) { return EMPTY; } b = Utils.cloneByteArray(b); return getNoCopy(b); }
byte[] buff = rs.getBytes(columnIndex); v = buff == null ? (Value) ValueNull.INSTANCE : ValueBytes.getNoCopy(buff); break;
case JAVA_OBJECT: case BLOB: return ValueBytes.getNoCopy(getBytesNoCopy()); case UUID: return ValueBytes.getNoCopy(getBytes()); case BYTE: return ValueBytes.getNoCopy(new byte[]{getByte()}); case SHORT: { int x = getShort(); return ValueBytes.getNoCopy(new byte[]{ (byte) (x >> 8), (byte) x return ValueBytes.getNoCopy(new byte[]{ (byte) (x >> 24), (byte) (x >> 16), return ValueBytes.getNoCopy(new byte[]{ (byte) (x >> 56), (byte) (x >> 48), return ValueTimestamp.parse(s.trim()); case BYTES: return ValueBytes.getNoCopy( StringUtils.convertHexToBytes(s.trim())); case JAVA_OBJECT:
byte[] buffer = StringUtils .convertHexToBytes(currentValue.getString()); r = ValueExpression.get(ValueBytes.getNoCopy(buffer)); } else if (equalsToken("E", name)) { String text = currentValue.getString();