Package org.basex.query.value.item
Class Hex
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
hash()
Returns a hash code for an atomic item.static byte[]
parse(byte[] value, InputInfo info)
Converts the given token into a byte array.byte[]
parse(Item item, InputInfo info)
Converts the given item to a byte array.byte[]
string(InputInfo ii)
Returns a string representation of the value.void
toString(QueryString qs)
Creates a query string.void
write(DataOutput out)
Writes the data structure to disk.-
Methods inherited from class org.basex.query.value.item.Bin
atomicEqual, binary, comparable, compare, equal, equals, input, toJava
-
Methods inherited from class org.basex.query.value.item.Item
atomItem, atomValue, bool, cache, dbl, ddo, dec, deepEqual, description, flt, instanceOf, isItem, item, itemAt, iter, itr, materialize, materialized, refineType, refineType, reverse, sameType, score, seqType, size, stringInput, subsequence, test, toXml, typeId, xdmInfo
-
Methods inherited from class org.basex.query.value.Value
accept, checkUp, compile, copy, count, exprSize, has, inline, inlineable, isEmpty, iter, iterator, refineType, serialize, serialize, serialize, value
-
Methods inherited from class org.basex.query.expr.Expr
arg, args, atomIter, data, funcType, hasFreeVars, indexAccessible, info, isSimple, markTailCalls, mergeEbv, optimize, optimizePos, simplify, simplifyFor, typeCheck, uses, vacuous, visitAll
-
Methods inherited from class org.basex.query.expr.ExprInfo
info, toErrorString, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Hex
public Hex(byte[] value)
Constructor.- Parameters:
value
- bytes
-
Hex
public Hex(byte[] value, InputInfo info) throws QueryException
Constructor.- Parameters:
value
- textual representationinfo
- input info (can benull
)- Throws:
QueryException
- query exception
-
Hex
public Hex(Bin bin, InputInfo info) throws QueryException
Constructor.- Parameters:
bin
- binary datainfo
- input info (can benull
)- Throws:
QueryException
- query exception
-
-
Method Detail
-
write
public void write(DataOutput out) throws IOException
Description copied from class:Value
Writes the data structure to disk.- Overrides:
write
in classItem
- Parameters:
out
- data output- Throws:
IOException
- I/O exception
-
string
public byte[] string(InputInfo ii)
Description copied from class:Item
Returns a string representation of the value.
-
hash
public int hash()
Description copied from class:Item
Returns a hash code for an atomic item. The returned values must be suitable for comparison according to the deep-equal rules.
-
parse
public byte[] parse(Item item, InputInfo info) throws QueryException
Description copied from class:Bin
Converts the given item to a byte array.- Specified by:
parse
in classBin
- Parameters:
item
- item to be convertedinfo
- input info (can benull
)- Returns:
- byte array
- Throws:
QueryException
- query exception
-
parse
public static byte[] parse(byte[] value, InputInfo info) throws QueryException
Converts the given token into a byte array.- Parameters:
value
- value to be convertedinfo
- input info (can benull
)- Returns:
- byte array
- Throws:
QueryException
- query exception
-
toString
public void toString(QueryString qs)
Description copied from class:ExprInfo
Creates a query string.
-
-