return new Value(value);
}
private Value getCombinedValue(Value value, Key key, int pos, int elemID, int attrID) {
Value result;
try {
int valSize = value.getLength();
int keySize = key.getLength();
int totalSize = valSize+keySize+16;
byte[] b = new byte[totalSize];
System.arraycopy(value.getRawData(), value.getOffset(), b, 0, valSize);
System.arraycopy(key.getRawData(), key.getOffset(), b, valSize+1, keySize);
int l = valSize+keySize+2;
ByteArray.writeInt(b, l, pos); // Write the pos
ByteArray.writeInt(b, l+4, elemID); // Write the elemID
ByteArray.writeInt(b, l+8, attrID); // Write the attrID
ByteArray.writeShort(b, l+12, (short)valSize);
result = new Value(b);
}
catch ( Exception e ) {
result = null; // This will never happen
}
return result;