@Override
    public void assign(Object o) {
        if (!checkAssign(o)) {
            return;
        }
        if (o instanceof Raw) {
            value = ((Raw) o).value;
        } else if (o instanceof ByteBuffer) {
            value = (ByteBuffer) o;
        } else if (o instanceof byte[]) {
            ByteBuffer byteBufVal = ByteBuffer.wrap((byte[]) o);
            byteBufVal.position(0);
            value = byteBufVal;
        } else {
            throw new IllegalArgumentException("Class " + o.getClass() + " not applicable to an " + this.getClass() + " instance.");
        }
    }
A field value which is an array of byte data

@author Einar M R Rosenvinge
document/src/main/java/com/yahoo/document/datatypes/Raw.java