Class Hex

All Implemented Interfaces:
Iterable<Item>

public final class Hex extends Bin
HexBinary item (xs:hexBinary).
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • Hex

      public Hex(byte[] value)
      Constructor.
      Parameters:
      value - bytes
    • Hex

      public Hex(byte[] value, InputInfo ii) throws QueryException
      Constructor.
      Parameters:
      value - textual representation
      ii - input info
      Throws:
      QueryException - query exception
    • Hex

      public Hex(Bin bin, InputInfo ii) throws QueryException
      Constructor.
      Parameters:
      bin - binary data
      ii - input info
      Throws:
      QueryException - query exception
  • Method Details

    • string

      public byte[] string(InputInfo ii) throws QueryException
      Description copied from class: Item
      Returns a string representation of the value.
      Specified by:
      string in class Item
      Parameters:
      ii - input info (can be null)
      Returns:
      string value
      Throws:
      QueryException - if the item cannot be atomized (caused by function or streaming items)
    • eq

      public boolean eq(Item item, Collation coll, StaticContext sc, InputInfo ii) throws QueryException
      Description copied from class: Item
      Compares the items for equality.
      Specified by:
      eq in class Item
      Parameters:
      item - item to be compared
      coll - collation (can be null)
      sc - static context; required for comparing items of type xs:QName (can be null)
      ii - input info (can be null)
      Returns:
      result of check
      Throws:
      QueryException - query exception
    • diff

      public int diff(Item item, Collation coll, InputInfo ii) throws QueryException
      Description copied from class: Item
      Returns the difference between the current and the specified item. This function is overwritten by the corresponding implementations.
      Overrides:
      diff in class Item
      Parameters:
      item - item to be compared
      coll - collation (can be null)
      ii - input info (can be null)
      Returns:
      difference
      Throws:
      QueryException - query exception
    • parse

      public static byte[] parse(Item item, InputInfo ii) throws QueryException
      Converts the given item to a byte array.
      Parameters:
      item - item to be converted
      ii - input info
      Returns:
      byte array
      Throws:
      QueryException - query exception
    • parse

      public static byte[] parse(byte[] value, InputInfo ii) throws QueryException
      Converts the given token into a byte array.
      Parameters:
      value - value to be converted
      ii - input info
      Returns:
      byte array
      Throws:
      QueryException - query exception
    • plan

      public void plan(QueryString qs)
      Description copied from class: ExprInfo
      Creates a query string.
      Specified by:
      plan in class ExprInfo
      Parameters:
      qs - query string builder