Class DefaultHttpChunkTrailer.TrailingHeaders

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<java.lang.String,​java.lang.String>>
    Enclosing class:
    DefaultHttpChunkTrailer

    private static final class DefaultHttpChunkTrailer.TrailingHeaders
    extends DefaultHttpHeaders
    • Constructor Detail

      • TrailingHeaders

        TrailingHeaders​(boolean validateHeaders)
    • Method Detail

      • add

        public HttpHeaders add​(java.lang.String name,
                               java.lang.Object value)
        Description copied from class: HttpHeaders
        Adds a new header with the specified name and value. If the specified value is not a String, it is converted into a String by Object.toString(), except in the cases of Date and Calendar, which are formatted to the date format defined in RFC2616.
        Overrides:
        add in class DefaultHttpHeaders
        Parameters:
        name - The name of the header being added
        value - The value of the header being added
        Returns:
        this
      • add

        public HttpHeaders add​(java.lang.String name,
                               java.lang.Iterable<?> values)
        Description copied from class: HttpHeaders
        Adds a new header with the specified name and values. This getMethod can be represented approximately as the following code:
         for (Object v: values) {
             if (v == null) {
                 break;
             }
             headers.add(name, v);
         }
         
        Overrides:
        add in class DefaultHttpHeaders
        Parameters:
        name - The name of the headers being set
        values - The values of the headers being set
        Returns:
        this
      • set

        public HttpHeaders set​(java.lang.String name,
                               java.lang.Iterable<?> values)
        Description copied from class: HttpHeaders
        Sets a header with the specified name and values. If there is an existing header with the same name, it is removed. This getMethod can be represented approximately as the following code:
         headers.remove(name);
         for (Object v: values) {
             if (v == null) {
                 break;
             }
             headers.add(name, v);
         }
         
        Overrides:
        set in class DefaultHttpHeaders
        Parameters:
        name - The name of the headers being set
        values - The values of the headers being set
        Returns:
        this
      • set

        public HttpHeaders set​(java.lang.String name,
                               java.lang.Object value)
        Description copied from class: HttpHeaders
        Sets a header with the specified name and value. If there is an existing header with the same name, it is removed. If the specified value is not a String, it is converted into a String by Object.toString(), except for Date and Calendar, which are formatted to the date format defined in RFC2616.
        Overrides:
        set in class DefaultHttpHeaders
        Parameters:
        name - The name of the header being set
        value - The value of the header being set
        Returns:
        this
      • validateName

        private static void validateName​(java.lang.String name)