Class Hex

  • All Implemented Interfaces:
    Iterable<Item>

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

      • Hex

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

        public Hex​(byte[] value,
                   InputInfo info)
            throws QueryException
        Constructor.
        Parameters:
        value - textual representation
        info - input info (can be null)
        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 class Item
        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.
        Specified by:
        string in class Item
        Parameters:
        ii - input info (can be null)
        Returns:
        string 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.
        Overrides:
        hash in class Item
        Returns:
        hash code
      • 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 class Bin
        Parameters:
        item - item to be converted
        info - input info (can be null)
        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 converted
        info - input info (can be null)
        Returns:
        byte array
        Throws:
        QueryException - query exception
      • toString

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