Class B64Lazy

  • All Implemented Interfaces:
    Iterable<Item>, Lazy

    public final class B64Lazy
    extends B64
    implements Lazy
    Lazy base64 item (xs:base64Binary).
    Author:
    BaseX Team 2005-24, BSD License, Christian Gruen
    • Constructor Detail

      • B64Lazy

        public B64Lazy​(IO input,
                       QueryError error)
        Constructor.
        Parameters:
        input - input
        error - error message to be thrown
    • Method Detail

      • binary

        public byte[] binary​(InputInfo info)
                      throws QueryException
        Description copied from class: Bin
        Returns the binary content.
        Overrides:
        binary in class Bin
        Parameters:
        info - input info (can be null)
        Returns:
        content
        Throws:
        QueryException - query exception
      • cache

        public void cache​(boolean lazy,
                          InputInfo ii)
                   throws QueryException
        Description copied from class: Item
        Caches data of lazy items (i.e., those implementing the Lazy interface). By calling this method, the streaming feature of lazy items will be disabled. Overwritten by Lazy, XQMap and XQArray.
        Overrides:
        cache in class Item
        Parameters:
        lazy - if false, cache immediately. if true, caching is deferred until the data is actually requested
        ii - input info (can be null)
        Throws:
        QueryException - query exception
      • isCached

        public boolean isCached()
        Description copied from interface: Lazy
        Indicates if the contents of this item have been cached.
        Specified by:
        isCached in interface Lazy
        Returns:
        result of check
      • materialize

        public Item materialize​(Predicate<Data> test,
                                InputInfo ii,
                                QueryContext qc)
                         throws QueryException
        Description copied from class: Value
        Returns a materialized version of this value without dependencies to persistent data. Raises an error if the value contains function items.
        Overrides:
        materialize in class Item
        Parameters:
        test - test to check if a node can be adopted unchanged
        ii - input info (can be null)
        qc - query context
        Returns:
        materialized value
        Throws:
        QueryException - query exception
      • materialized

        public boolean materialized​(Predicate<Data> test,
                                    InputInfo ii)
                             throws QueryException
        Description copied from class: Value
        Checks if this value is materialized, i.e., contains no persistent database nodes or function items.
        Overrides:
        materialized in class Item
        Parameters:
        test - test to check if a node can be adopted unchanged
        ii - input info (can be null)
        Returns:
        result of check
        Throws:
        QueryException - query exception
      • toString

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