-
- All Superinterfaces:
ScalarTyped
,ScalarValued
,TokenTyped
,TokenValued
- All Known Subinterfaces:
BinaryInputField
,BinaryValuedIterator
- All Known Implementing Classes:
BinaryRegister
,BinaryToken
,NullToken
public interface BinaryValued extends ScalarValued
ATokenValued
object containing a binary value.- See Also:
TokenTypeConstant#BINARY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
asBinary()
Gets the contained binary value.byte[]
asBinaryRef()
Gets a reference to the contained binary value.-
Methods inherited from interface com.pervasive.datarush.tokens.scalar.ScalarValued
getType, isZero
-
Methods inherited from interface com.pervasive.datarush.tokens.TokenValued
isNull
-
-
-
-
Method Detail
-
asBinary
byte[] asBinary()
Gets the contained binary value.The array returned is a copy of the binary data contained in the object. To avoid this overhead, use
asBinaryRef()
instead.- Returns:
- the contained value as a
byte[]
. If null valued, as indicated byTokenValued.isNull()
,null
is returned.
-
asBinaryRef
byte[] asBinaryRef()
Gets a reference to the contained binary value.While this call avoids the overhead seen with
asBinary()
, the caller must guarantee that the returned array will not be modified. Failure to comply may result in the dataflow exhibiting unexpected behavior, as other operators may (or may not) see the modified value.- Returns:
- a reference to the
byte[]
holding the contained value. If null valued, as indicated byTokenValued.isNull()
,null
is returned.
-
-