org.openmuc.framework.data
Constructor and Description |
---|
ByteArrayValue(byte[] value)
Create a new ByteArrayValue whose internal byte array will be a reference to the
value passed to
this constructor. |
ByteArrayValue(byte[] value,
boolean copy)
Creates a new ByteArrayValue copying the byte array passed if
copy is true. |
public ByteArrayValue(byte[] value)
value
passed to
this constructor. That means the passed byte array is not copied. Therefore you should not change the contents of
value after calling this constructor. If you want ByteArrayValue to internally store a copy of the passed value
then you should use the other constructor of this class instead.value
- the byte array value.public ByteArrayValue(byte[] value, boolean copy)
copy
is true.value
- the byte array value.copy
- if true it will internally store a copy of value, else it will store a reference to value.public byte[] asByteArray()
asByteArray
in interface Value
public java.lang.String toString()
toString
in class java.lang.Object