Class B64

All Implemented Interfaces:
Iterable<Item>
Direct Known Subclasses:
B64Lazy

public class B64 extends Bin
Base64 item (xs:base64Binary).
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • EMPTY

      public static final B64 EMPTY
      Empty value.
  • Method Details

    • get

      public static B64 get(byte value)
      Returns an instance of this class for single bytes.
      Parameters:
      value - value
      Returns:
      instance
    • get

      public static B64 get(byte[] value)
      Returns an instance of this class.
      Parameters:
      value - value
      Returns:
      instance
    • get

      public static B64 get(Bin bin, InputInfo ii) throws QueryException
      Returns an instance of this class.
      Parameters:
      bin - binary input
      ii - input info
      Returns:
      instance
      Throws:
      QueryException - query exception
    • get

      public static B64 get(byte[] value, InputInfo ii) throws QueryException
      Returns an instance of this class.
      Parameters:
      value - textual representation
      ii - input info
      Returns:
      instance
      Throws:
      QueryException - query exception
    • 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 final 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 final 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