Interface DownloadFile

    • Method Detail

      • getSize

        Optional<Long> getSize()
        Retrieves the size of the file, in bytes.
        Returns:
        Byte size.
      • getBinaryURI

        URI getBinaryURI()
        Retrieves a URI to the file's binary. Should be accessible to the service being used to generate the archive.
        Returns:
        URI to a binary.
      • getParameter

        <T> T getParameter​(String parameterName,
                           Class<T> clazz)
        Retrieves one of the file's parameters by name. The value will be converted to the specified type.
        Type Parameters:
        T - Target type for the parameter value.
        Parameters:
        parameterName - The name of the parameter whose value to retrieve.
        clazz - The type to which that the parameter's value will be converted.
        Returns:
        The given parameter's value.
      • getParameter

        <T> T getParameter​(String parameterName,
                           T defaultValue)
        Retrieves one of the file's parameters by name. If the parameter doesn't have a value then the method will return the given default value instead. The parameter value will be converted to the specified type.
        Type Parameters:
        T - Target type for the parameter value.
        Parameters:
        parameterName - The name of the parameter whose value to retrieve.
        defaultValue - Value to return if the parameter has no value.
        Returns:
        The given parameter's value, or the given defalt value.
      • getParameterNames

        String[] getParameterNames()
        Retrieves the names of all parameters included in the file.
        Returns:
        Parameter names.