Class ReadOnlyHttp2Headers

    • Method Detail

      • trailers

        public static ReadOnlyHttp2Headers trailers​(boolean validateHeaders,
                                                    AsciiString... otherHeaders)
        Used to create read only object designed to represent trailers.

        If this is used for a purpose other than trailers you may violate the header serialization ordering defined by RFC 7540, 8.1.2.1.

        Parameters:
        validateHeaders - true will run validation on each header name/value pair to ensure protocol compliance.
        otherHeaders - An array of key:value pairs. Must not contain any pseudo headers or null names/values. A copy will NOT be made of this array. If the contents of this array may be modified externally you are responsible for passing in a copy.
        Returns:
        A read only representation of the headers.
      • serverHeaders

        public static ReadOnlyHttp2Headers serverHeaders​(boolean validateHeaders,
                                                         AsciiString status,
                                                         AsciiString... otherHeaders)
        Create a new read only representation of headers used by servers.
        Parameters:
        validateHeaders - true will run validation on each header name/value pair to ensure protocol compliance.
        status - The value for Http2Headers.PseudoHeaderName.STATUS.
        otherHeaders - An array of key:value pairs. Must not contain any pseudo headers or null names/values. A copy will NOT be made of this array. If the contents of this array may be modified externally you are responsible for passing in a copy.
        Returns:
        a new read only representation of headers used by servers.
      • get

        public CharSequence get​(CharSequence name)
        Description copied from interface: Headers
        Returns the value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        get in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the first header value if the header is found. null if there's no such header
      • get

        public CharSequence get​(CharSequence name,
                                CharSequence defaultValue)
        Description copied from interface: Headers
        Returns the value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        get in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the first header value or defaultValue if there is no such header
      • getAndRemove

        public CharSequence getAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the value of a header with the specified name and removes it from this object. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the first header value or null if there is no such header
      • getAndRemove

        public CharSequence getAndRemove​(CharSequence name,
                                         CharSequence defaultValue)
        Description copied from interface: Headers
        Returns the value of a header with the specified name and removes it from this object. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the first header value or defaultValue if there is no such header
      • getBoolean

        public Boolean getBoolean​(CharSequence name)
        Description copied from interface: Headers
        Returns the boolean value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getBoolean in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the boolean value of the first value in insertion order or null if there is no such value or it can't be converted to boolean.
      • getBoolean

        public boolean getBoolean​(CharSequence name,
                                  boolean defaultValue)
        Description copied from interface: Headers
        Returns the boolean value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getBoolean in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the boolean value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to boolean.
      • getByte

        public Byte getByte​(CharSequence name)
        Description copied from interface: Headers
        Returns the byte value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getByte in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the byte value of the first value in insertion order or null if there is no such value or it can't be converted to byte.
      • getByte

        public byte getByte​(CharSequence name,
                            byte defaultValue)
        Description copied from interface: Headers
        Returns the byte value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getByte in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the byte value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to byte.
      • getChar

        public Character getChar​(CharSequence name)
        Description copied from interface: Headers
        Returns the char value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getChar in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the char value of the first value in insertion order or null if there is no such value or it can't be converted to char.
      • getChar

        public char getChar​(CharSequence name,
                            char defaultValue)
        Description copied from interface: Headers
        Returns the char value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getChar in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the char value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to char.
      • getShort

        public Short getShort​(CharSequence name)
        Description copied from interface: Headers
        Returns the short value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getShort in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the short value of the first value in insertion order or null if there is no such value or it can't be converted to short.
      • getShort

        public short getShort​(CharSequence name,
                              short defaultValue)
        Description copied from interface: Headers
        Returns the short value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getShort in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the short value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to short.
      • getInt

        public Integer getInt​(CharSequence name)
        Description copied from interface: Headers
        Returns the int value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getInt in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the int value of the first value in insertion order or null if there is no such value or it can't be converted to int.
      • getInt

        public int getInt​(CharSequence name,
                          int defaultValue)
        Description copied from interface: Headers
        Returns the int value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getInt in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the int value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to int.
      • getLong

        public Long getLong​(CharSequence name)
        Description copied from interface: Headers
        Returns the long value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getLong in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the long value of the first value in insertion order or null if there is no such value or it can't be converted to long.
      • getLong

        public long getLong​(CharSequence name,
                            long defaultValue)
        Description copied from interface: Headers
        Returns the long value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getLong in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the long value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to long.
      • getFloat

        public Float getFloat​(CharSequence name)
        Description copied from interface: Headers
        Returns the float value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getFloat in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the float value of the first value in insertion order or null if there is no such value or it can't be converted to float.
      • getFloat

        public float getFloat​(CharSequence name,
                              float defaultValue)
        Description copied from interface: Headers
        Returns the float value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getFloat in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the float value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to float.
      • getDouble

        public Double getDouble​(CharSequence name)
        Description copied from interface: Headers
        Returns the double value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getDouble in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the double value of the first value in insertion order or null if there is no such value or it can't be converted to double.
      • getDouble

        public double getDouble​(CharSequence name,
                                double defaultValue)
        Description copied from interface: Headers
        Returns the double value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getDouble in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the double value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to double.
      • getTimeMillis

        public Long getTimeMillis​(CharSequence name)
        Description copied from interface: Headers
        Returns the value of a header with the specified name in milliseconds. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getTimeMillis in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the milliseconds value of the first value in insertion order or null if there is no such value or it can't be converted to milliseconds.
      • getTimeMillis

        public long getTimeMillis​(CharSequence name,
                                  long defaultValue)
        Description copied from interface: Headers
        Returns the value of a header with the specified name in milliseconds. If there is more than one value for the specified name, the first value in insertion order is returned.
        Specified by:
        getTimeMillis in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the milliseconds value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to milliseconds.
      • getBooleanAndRemove

        public Boolean getBooleanAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the boolean value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getBooleanAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the boolean value of the first value in insertion order or null if there is no such value or it can't be converted to boolean.
      • getBooleanAndRemove

        public boolean getBooleanAndRemove​(CharSequence name,
                                           boolean defaultValue)
        Description copied from interface: Headers
        Returns the boolean value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getBooleanAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the boolean value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to boolean.
      • getByteAndRemove

        public Byte getByteAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the byte value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getByteAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        Returns:
        the byte value of the first value in insertion order or null if there is no such value or it can't be converted to byte.
      • getByteAndRemove

        public byte getByteAndRemove​(CharSequence name,
                                     byte defaultValue)
        Description copied from interface: Headers
        Returns the byte value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getByteAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the byte value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to byte.
      • getCharAndRemove

        public Character getCharAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the char value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getCharAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        Returns:
        the char value of the first value in insertion order or null if there is no such value or it can't be converted to char.
      • getCharAndRemove

        public char getCharAndRemove​(CharSequence name,
                                     char defaultValue)
        Description copied from interface: Headers
        Returns the char value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getCharAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the char value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to char.
      • getShortAndRemove

        public Short getShortAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the short value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getShortAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        Returns:
        the short value of the first value in insertion order or null if there is no such value or it can't be converted to short.
      • getShortAndRemove

        public short getShortAndRemove​(CharSequence name,
                                       short defaultValue)
        Description copied from interface: Headers
        Returns the short value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getShortAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the short value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to short.
      • getIntAndRemove

        public Integer getIntAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the int value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getIntAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        Returns:
        the int value of the first value in insertion order or null if there is no such value or it can't be converted to int.
      • getIntAndRemove

        public int getIntAndRemove​(CharSequence name,
                                   int defaultValue)
        Description copied from interface: Headers
        Returns the int value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getIntAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the int value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to int.
      • getLongAndRemove

        public Long getLongAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the long value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getLongAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        Returns:
        the long value of the first value in insertion order or null if there is no such value or it can't be converted to long.
      • getLongAndRemove

        public long getLongAndRemove​(CharSequence name,
                                     long defaultValue)
        Description copied from interface: Headers
        Returns the long value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getLongAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the long value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to long.
      • getFloatAndRemove

        public Float getFloatAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the float value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getFloatAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        Returns:
        the float value of the first value in insertion order or null if there is no such value or it can't be converted to float.
      • getFloatAndRemove

        public float getFloatAndRemove​(CharSequence name,
                                       float defaultValue)
        Description copied from interface: Headers
        Returns the float value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getFloatAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the float value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to float.
      • getDoubleAndRemove

        public Double getDoubleAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the double value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getDoubleAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        Returns:
        the double value of the first value in insertion order or null if there is no such value or it can't be converted to double.
      • getDoubleAndRemove

        public double getDoubleAndRemove​(CharSequence name,
                                         double defaultValue)
        Description copied from interface: Headers
        Returns the double value of a header with the specified name and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getDoubleAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to search
        defaultValue - the default value
        Returns:
        the double value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to double.
      • getTimeMillisAndRemove

        public Long getTimeMillisAndRemove​(CharSequence name)
        Description copied from interface: Headers
        Returns the value of a header with the specified name in milliseconds and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getTimeMillisAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        Returns:
        the milliseconds value of the first value in insertion order or null if there is no such value or it can't be converted to milliseconds.
      • getTimeMillisAndRemove

        public long getTimeMillisAndRemove​(CharSequence name,
                                           long defaultValue)
        Description copied from interface: Headers
        Returns the value of a header with the specified name in milliseconds and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values for name are removed.

        If an exception occurs during the translation from type T all entries with name may still be removed.

        Specified by:
        getTimeMillisAndRemove in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the name of the header to retrieve
        defaultValue - the default value
        Returns:
        the milliseconds value of the first value in insertion order or defaultValue if there is no such value or it can't be converted to milliseconds.
      • containsBoolean

        public boolean containsBoolean​(CharSequence name,
                                       boolean value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsBoolean in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsByte

        public boolean containsByte​(CharSequence name,
                                    byte value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsByte in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsChar

        public boolean containsChar​(CharSequence name,
                                    char value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsChar in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsShort

        public boolean containsShort​(CharSequence name,
                                     short value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsShort in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsInt

        public boolean containsInt​(CharSequence name,
                                   int value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsInt in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsLong

        public boolean containsLong​(CharSequence name,
                                    long value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsLong in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsFloat

        public boolean containsFloat​(CharSequence name,
                                     float value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsFloat in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsDouble

        public boolean containsDouble​(CharSequence name,
                                      double value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsDouble in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • containsTimeMillis

        public boolean containsTimeMillis​(CharSequence name,
                                          long value)
        Description copied from interface: Headers
        Returns true if a header with the name and value exists.
        Specified by:
        containsTimeMillis in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if it contains it false otherwise
      • set

        public Http2Headers set​(CharSequence name,
                                CharSequence... values)
        Description copied from interface: Headers
        Sets a header with the specified name and values. Any existing headers with this name are removed. This method is equivalent to:
         headers.remove(name);
         for (T v : values) {
             headers.add(name, v);
         }
         
        Specified by:
        set in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        values - the value of the header
        Returns:
        this
      • setObject

        public Http2Headers setObject​(CharSequence name,
                                      Iterable<?> values)
        Description copied from interface: Headers
        Sets a header with the specified name and values. Any existing headers with this name are removed. This method is equivalent to:
         headers.remove(name);
         for (Object v : values) {
             headers.addObject(name, v);
         }
         
        Specified by:
        setObject in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        values - the values of the header
        Returns:
        this
      • setObject

        public Http2Headers setObject​(CharSequence name,
                                      Object... values)
        Description copied from interface: Headers
        Sets a header with the specified name and values. Any existing headers with this name are removed. This method is equivalent to:
         headers.remove(name);
         for (Object v : values) {
             headers.addObject(name, v);
         }
         
        Specified by:
        setObject in interface Headers<CharSequence,​CharSequence,​Http2Headers>
        Parameters:
        name - the header name
        values - the values of the header
        Returns:
        this
      • contains

        public boolean contains​(CharSequence name,
                                CharSequence value,
                                boolean caseInsensitive)
        Description copied from interface: Http2Headers
        Returns true if a header with the name and value exists, false otherwise.

        If caseInsensitive is true then a case insensitive compare is done on the value.

        Specified by:
        contains in interface Http2Headers
        Parameters:
        name - the name of the header to find
        value - the value of the header to find
        caseInsensitive - true then a case insensitive compare is run to compare values. otherwise a case sensitive compare is run to compare values.