Class FunctionBINFILE

  • All Implemented Interfaces:
    ExpressionItem

    public class FunctionBINFILE
    extends AbstractFunction
    The Function loads bin file and encodes it into string.
    Since:
    6.1.0
    • Field Detail

      • ARG_TYPES

        private static final ValueType[][] ARG_TYPES
    • Constructor Detail

      • FunctionBINFILE

        public FunctionBINFILE()
    • Method Detail

      • hasSplitFlag

        private static boolean hasSplitFlag​(java.lang.String name,
                                            FunctionBINFILE.Type type)
      • hasDeflateFlag

        private static boolean hasDeflateFlag​(java.lang.String name,
                                              FunctionBINFILE.Type type)
      • getName

        public java.lang.String getName()
        Description copied from class: AbstractFunction
        Get the function name
        Specified by:
        getName in class AbstractFunction
        Returns:
        the function name in lower case, must not be null
      • getReference

        public java.lang.String getReference()
        Description copied from class: AbstractFunction
        Get the function reference to be output for a help request
        Specified by:
        getReference in class AbstractFunction
        Returns:
        the function information as a String, must not be null
      • getArity

        public int getArity()
        Description copied from class: AbstractFunction
        Get the function arity
        Specified by:
        getArity in class AbstractFunction
        Returns:
        the function arity (zero or greater)
      • convertTo

        private static java.lang.String convertTo​(java.io.File file,
                                                  FunctionBINFILE.Type type,
                                                  boolean deflate,
                                                  int lineLength,
                                                  java.lang.String endOfLine)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • deflate

        private static byte[] deflate​(byte[] data)
                               throws java.io.IOException
        Throws:
        java.io.IOException