Class FileItemHeaders

    • Constructor Detail

      • FileItemHeaders

        public FileItemHeaders()
    • Method Detail

      • getHeader

        @Nullable
        public String getHeader​(@Nonnull
                                String sName)
        Description copied from interface: IFileItemHeaders
        Returns the value of the specified part header as a String. If the part did not include a header of the specified name, this method return null. If there are multiple headers with the same name, this method returns the first header in the item. The header name is case insensitive.
        Specified by:
        getHeader in interface IFileItemHeaders
        Parameters:
        sName - a String specifying the header name
        Returns:
        a String containing the value of the requested header, or null if the item does not have a header of that name
      • getHeaders

        @Nonnull
        public Iterator<String> getHeaders​(@Nonnull
                                           String sName)
        Description copied from interface: IFileItemHeaders

        Returns all the values of the specified item header as an Iterator of String objects.

        If the item did not include any headers of the specified name, this method returns an empty Iterator. The header name is case insensitive.

        Specified by:
        getHeaders in interface IFileItemHeaders
        Parameters:
        sName - a String specifying the header name
        Returns:
        an Enumeration containing the values of the requested header. If the item does not have any headers of that name, return an empty Iterator
      • getAllHeaderNames

        @Nonnull
        @ReturnsMutableCopy
        public com.helger.commons.collection.impl.ICommonsList<String> getAllHeaderNames()
        Description copied from interface: IFileItemHeaders

        Returns a List of all the header names.

        Specified by:
        getAllHeaderNames in interface IFileItemHeaders
        Returns:
        an List containing the values of the requested header. If the item does not have any headers of that name return an empty Enumeration
      • addHeader

        public void addHeader​(@Nonnull
                              String sName,
                              @Nullable
                              String sValue)
        Method to add header values to this instance.
        Parameters:
        sName - name of this header
        sValue - value of this header