GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.handler.codec.http
  • EmptyHttpHeaders

This view

  • Original page
  • New address

GeezerVison is showing netty.io — EmptyHttpHeaders (Netty API Reference (4.1.141.Final))

Class EmptyHttpHeaders

java.lang.Object
io.netty.handler.codec.http.HttpHeaders
io.netty.handler.codec.http.EmptyHttpHeaders
All Implemented Interfaces:
Iterable<Map.Entry<String,String>>

public class EmptyHttpHeaders extends HttpHeaders
  • Nested Class Summary

    Nested classes/interfaces inherited from class HttpHeaders

    HttpHeaders.Names, HttpHeaders.Values
    Modifier and Type
    Class
    Description
    static final class 
    HttpHeaders.Names
    Deprecated.
    Use HttpHeaderNames instead.
    static final class 
    HttpHeaders.Values
    Deprecated.
    Use HttpHeaderValues instead.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EmptyHttpHeaders
    INSTANCE
     

    Fields inherited from class HttpHeaders

    EMPTY_HEADERS
    Modifier and Type
    Field
    Description
    static final HttpHeaders
    EMPTY_HEADERS
    Deprecated.
    Use INSTANCE.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EmptyHttpHeaders()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    HttpHeaders
    add(String name, Iterable<?> values)
     
    HttpHeaders
    add(String name, Object value)
     
    HttpHeaders
    addInt(CharSequence name, int value)
    Add the name to value.
    HttpHeaders
    addShort(CharSequence name, short value)
    Add the name to value.
    HttpHeaders
    clear()
    Removes all headers from this HttpMessage.
    boolean
    contains(String name)
     
    List<Map.Entry<String,String>>
    entries()
    Returns a new List that contains all headers in this object.
    String
    get(String name)
     
    List<String>
    getAll(String name)
     
    Integer
    getInt(CharSequence name)
    Returns the integer value of a header with the specified name.
    int
    getInt(CharSequence name, int defaultValue)
    Returns the integer value of a header with the specified name.
    Short
    getShort(CharSequence name)
    Returns the short value of a header with the specified name.
    short
    getShort(CharSequence name, short defaultValue)
    Returns the short value of a header with the specified name.
    Long
    getTimeMillis(CharSequence name)
    Returns the date value of a header with the specified name.
    long
    getTimeMillis(CharSequence name, long defaultValue)
    Returns the date value of a header with the specified name.
    boolean
    isEmpty()
    Checks if no header exists.
    Iterator<Map.Entry<String,String>>
    iterator()
     
    Iterator<Map.Entry<CharSequence, CharSequence>>
    iteratorCharSequence()
     
    Set<String>
    names()
    Returns a new Set that contains the names of all headers in this object.
    HttpHeaders
    remove(String name)
     
    HttpHeaders
    set(String name, Iterable<?> values)
     
    HttpHeaders
    set(String name, Object value)
     
    HttpHeaders
    setInt(CharSequence name, int value)
    Set the name to value.
    HttpHeaders
    setShort(CharSequence name, short value)
    Set the name to value.
    int
    size()
    Returns the number of headers in this object.

    Methods inherited from class HttpHeaders

    add, add, add, addDateHeader, addDateHeader, addHeader, addHeader, addIntHeader, addIntHeader, clearHeaders, contains, contains, contains, containsValue, copy, encodeAscii, equalsIgnoreCase, get, get, getAll, getAllAsString, getAsString, getContentLength, getContentLength, getDate, getDate, getDateHeader, getDateHeader, getDateHeader, getDateHeader, getHeader, getHeader, getHeader, getHeader, getHost, getHost, getIntHeader, getIntHeader, getIntHeader, getIntHeader, is100ContinueExpected, isContentLengthSet, isKeepAlive, isTransferEncodingChunked, iteratorAsString, newEntity, remove, removeHeader, removeHeader, removeTransferEncodingChunked, set, set, set, set100ContinueExpected, set100ContinueExpected, setAll, setContentLength, setDate, setDateHeader, setDateHeader, setDateHeader, setDateHeader, setHeader, setHeader, setHeader, setHeader, setHost, setHost, setIntHeader, setIntHeader, setIntHeader, setIntHeader, setKeepAlive, setTransferEncodingChunked, toString, valueCharSequenceIterator, valueStringIterator
    Modifier and Type
    Method
    Description
    HttpHeaders
    add(HttpHeaders headers)
    Adds all header entries of the specified headers.
    HttpHeaders
    add(CharSequence name, Iterable<?> values)
    Adds a new header with the specified name and values.
    HttpHeaders
    add(CharSequence name, Object value)
    Adds a new header with the specified name and value.
    static void
    addDateHeader(HttpMessage message, CharSequence name, Date value)
    Deprecated.
    Use HttpHeaders.add(CharSequence, Object) instead.
    static void
    addDateHeader(HttpMessage message, String name, Date value)
    Deprecated.
    Use HttpHeaders.add(CharSequence, Object) instead.
    static void
    addHeader(HttpMessage message, CharSequence name, Object value)
    Deprecated.
    Use HttpHeaders.add(CharSequence, Object) instead.
    static void
    addHeader(HttpMessage message, String name, Object value)
    Deprecated.
    Use HttpHeaders.add(CharSequence, Object) instead.
    static void
    addIntHeader(HttpMessage message, CharSequence name, int value)
    Deprecated.
    Use HttpHeaders.addInt(CharSequence, int) instead.
    static void
    addIntHeader(HttpMessage message, String name, int value)
    Deprecated.
    Use HttpHeaders.add(CharSequence, Iterable) instead.
    static void
    clearHeaders(HttpMessage message)
    Deprecated.
    Use HttpHeaders.clear() instead.
    boolean
    contains(CharSequence name)
    Checks to see if there is a header with the specified name
    boolean
    contains(CharSequence name, CharSequence value, boolean ignoreCase)
    Returns true if a header with the name and value exists, false otherwise.
    boolean
    contains(String name, String value, boolean ignoreCase)
     
    boolean
    containsValue(CharSequence name, CharSequence value, boolean ignoreCase)
    Returns true if a header with the name and value exists, false otherwise.
    HttpHeaders
    copy()
    Returns a deep copy of the passed in HttpHeaders.
    static void
    encodeAscii(CharSequence seq, ByteBuf buf)
    Deprecated.
    static boolean
    equalsIgnoreCase(CharSequence name1, CharSequence name2)
    Deprecated.
    Use AsciiString.contentEqualsIgnoreCase(CharSequence, CharSequence) instead.
    String
    get(CharSequence name)
    Returns the value of a header with the specified name.
    String
    get(CharSequence name, String defaultValue)
    Returns the value of a header with the specified name.
    List<String>
    getAll(CharSequence name)
    Returns the values of headers with the specified name
    final List<String>
    getAllAsString(CharSequence name)
    Headers.getAll(Object) and convert each element of List to a String.
    final String
    getAsString(CharSequence name)
    Headers.get(Object) and convert the result to a String.
    static long
    getContentLength(HttpMessage message)
    Deprecated.
    Use HttpUtil.getContentLength(HttpMessage) instead.
    static long
    getContentLength(HttpMessage message, long defaultValue)
    Deprecated.
    Use HttpUtil.getContentLength(HttpMessage, long) instead.
    static Date
    getDate(HttpMessage message)
    Deprecated.
    Use HttpHeaders.getTimeMillis(CharSequence) instead.
    static Date
    getDate(HttpMessage message, Date defaultValue)
    Deprecated.
    Use HttpHeaders.getTimeMillis(CharSequence, long) instead.
    static Date
    getDateHeader(HttpMessage message, CharSequence name)
    Deprecated.
    Use HttpHeaders.getTimeMillis(CharSequence) instead.
    static Date
    getDateHeader(HttpMessage message, CharSequence name, Date defaultValue)
    Deprecated.
    Use HttpHeaders.getTimeMillis(CharSequence, long) instead.
    static Date
    getDateHeader(HttpMessage message, String name)
    Deprecated.
    Use HttpHeaders.getTimeMillis(CharSequence) instead.
    static Date
    getDateHeader(HttpMessage message, String name, Date defaultValue)
    Deprecated.
    Use HttpHeaders.getTimeMillis(CharSequence, long) instead.
    static String
    getHeader(HttpMessage message, CharSequence name)
    Deprecated.
    Use HttpHeaders.get(CharSequence) instead.
    static String
    getHeader(HttpMessage message, CharSequence name, String defaultValue)
    Deprecated.
    Use HttpHeaders.get(CharSequence, String) instead.
    static String
    getHeader(HttpMessage message, String name)
    Deprecated.
    Use HttpHeaders.get(CharSequence) instead.
    static String
    getHeader(HttpMessage message, String name, String defaultValue)
    Deprecated.
    Use HttpHeaders.get(CharSequence, String) instead.
    static String
    getHost(HttpMessage message)
    Deprecated.
    Use HttpHeaders.get(CharSequence) instead.
    static String
    getHost(HttpMessage message, String defaultValue)
    Deprecated.
    Use HttpHeaders.get(CharSequence, String) instead.
    static int
    getIntHeader(HttpMessage message, CharSequence name)
    Deprecated.
    Use HttpHeaders.getInt(CharSequence) instead.
    static int
    getIntHeader(HttpMessage message, CharSequence name, int defaultValue)
    Deprecated.
    Use HttpHeaders.getInt(CharSequence, int) instead.
    static int
    getIntHeader(HttpMessage message, String name)
    Deprecated.
    Use HttpHeaders.getInt(CharSequence) instead.
    static int
    getIntHeader(HttpMessage message, String name, int defaultValue)
    Deprecated.
    Use HttpHeaders.getInt(CharSequence, int) instead.
    static boolean
    is100ContinueExpected(HttpMessage message)
    Deprecated.
    Use HttpUtil.is100ContinueExpected(HttpMessage) instead.
    static boolean
    isContentLengthSet(HttpMessage m)
    Deprecated.
    Use HttpUtil.isContentLengthSet(HttpMessage) instead.
    static boolean
    isKeepAlive(HttpMessage message)
    Deprecated.
    Use HttpUtil.isKeepAlive(HttpMessage) instead.
    static boolean
    isTransferEncodingChunked(HttpMessage message)
    Deprecated.
    Use HttpUtil.isTransferEncodingChunked(HttpMessage) instead.
    final Iterator<Map.Entry<String,String>>
    iteratorAsString()
    Iterator that converts each Map.Entry's key and value to a String.
    static CharSequence
    newEntity(String name)
    Deprecated.
    Use AsciiString instead.
    HttpHeaders
    remove(CharSequence name)
    Removes the header with the specified name.
    static void
    removeHeader(HttpMessage message, CharSequence name)
    Deprecated.
    Use HttpHeaders.remove(CharSequence) instead.
    static void
    removeHeader(HttpMessage message, String name)
    Deprecated.
    Use HttpHeaders.remove(CharSequence) instead.
    static void
    removeTransferEncodingChunked(HttpMessage m)
    Deprecated.
    Use HttpUtil.setTransferEncodingChunked(HttpMessage, boolean) instead.
    HttpHeaders
    set(HttpHeaders headers)
    Cleans the current header entries and copies all header entries of the specified headers.
    HttpHeaders
    set(CharSequence name, Iterable<?> values)
    Sets a header with the specified name and values.
    HttpHeaders
    set(CharSequence name, Object value)
    Sets a header with the specified name and value.
    static void
    set100ContinueExpected(HttpMessage message)
    Deprecated.
    Use HttpUtil.set100ContinueExpected(HttpMessage, boolean) instead.
    static void
    set100ContinueExpected(HttpMessage message, boolean set)
    Deprecated.
    Use HttpUtil.set100ContinueExpected(HttpMessage, boolean) instead.
    HttpHeaders
    setAll(HttpHeaders headers)
    Retains all current headers but calls HttpHeaders.set(String, Object) for each entry in headers
    static void
    setContentLength(HttpMessage message, long length)
    Deprecated.
    Use HttpUtil.setContentLength(HttpMessage, long) instead.
    static void
    setDate(HttpMessage message, Date value)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Object) instead.
    static void
    setDateHeader(HttpMessage message, CharSequence name, Iterable<Date> values)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Iterable) instead.
    static void
    setDateHeader(HttpMessage message, CharSequence name, Date value)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Object) instead.
    static void
    setDateHeader(HttpMessage message, String name, Iterable<Date> values)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Iterable) instead.
    static void
    setDateHeader(HttpMessage message, String name, Date value)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Object) instead.
    static void
    setHeader(HttpMessage message, CharSequence name, Iterable<?> values)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Iterable) instead.
    static void
    setHeader(HttpMessage message, CharSequence name, Object value)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Object) instead.
    static void
    setHeader(HttpMessage message, String name, Iterable<?> values)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Iterable) instead.
    static void
    setHeader(HttpMessage message, String name, Object value)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Object) instead.
    static void
    setHost(HttpMessage message, CharSequence value)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Object) instead.
    static void
    setHost(HttpMessage message, String value)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Object) instead.
    static void
    setIntHeader(HttpMessage message, CharSequence name, int value)
    Deprecated.
    Use HttpHeaders.setInt(CharSequence, int) instead.
    static void
    setIntHeader(HttpMessage message, CharSequence name, Iterable<Integer> values)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Iterable) instead.
    static void
    setIntHeader(HttpMessage message, String name, int value)
    Deprecated.
    Use HttpHeaders.setInt(CharSequence, int) instead.
    static void
    setIntHeader(HttpMessage message, String name, Iterable<Integer> values)
    Deprecated.
    Use HttpHeaders.set(CharSequence, Iterable) instead.
    static void
    setKeepAlive(HttpMessage message, boolean keepAlive)
    Deprecated.
    Use HttpUtil.setKeepAlive(HttpMessage, boolean) instead.
    static void
    setTransferEncodingChunked(HttpMessage m)
    Deprecated.
    Use HttpUtil.setTransferEncodingChunked(HttpMessage, boolean) instead.
    String
    toString()
     
    Iterator<? extends CharSequence>
    valueCharSequenceIterator(CharSequence name)
    Equivalent to HttpHeaders.getAll(String) but it is possible that no intermediate list is generated.
    Iterator<String>
    valueStringIterator(CharSequence name)
    Equivalent to HttpHeaders.getAll(String) but it is possible that no intermediate list is generated.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface Iterable

    forEach, spliterator
  • Field Details

    • INSTANCE

      public static final EmptyHttpHeaders INSTANCE
  • Constructor Details

    • EmptyHttpHeaders

      protected EmptyHttpHeaders()
  • Method Details

    • get

      public String get(String name)
      Specified by:
      get in class HttpHeaders
      See Also:
      • HttpHeaders.get(CharSequence)
    • getInt

      public Integer getInt(CharSequence name)
      Description copied from class: HttpHeaders
      Returns the integer value of a header with the specified name. If there are more than one values for the specified name, the first value is returned.
      Specified by:
      getInt in class HttpHeaders
      Parameters:
      name - the name of the header to search
      Returns:
      the first header value if the header is found and its value is an integer. null if there's no such header or its value is not an integer.
    • getInt

      public int getInt(CharSequence name, int defaultValue)
      Description copied from class: HttpHeaders
      Returns the integer value of a header with the specified name. If there are more than one values for the specified name, the first value is returned.
      Specified by:
      getInt in class HttpHeaders
      Parameters:
      name - the name of the header to search
      defaultValue - the default value
      Returns:
      the first header value if the header is found and its value is an integer. defaultValue if there's no such header or its value is not an integer.
    • getShort

      public Short getShort(CharSequence name)
      Description copied from class: HttpHeaders
      Returns the short value of a header with the specified name. If there are more than one values for the specified name, the first value is returned.
      Specified by:
      getShort in class HttpHeaders
      Parameters:
      name - the name of the header to search
      Returns:
      the first header value if the header is found and its value is a short. null if there's no such header or its value is not a short.
    • getShort

      public short getShort(CharSequence name, short defaultValue)
      Description copied from class: HttpHeaders
      Returns the short value of a header with the specified name. If there are more than one values for the specified name, the first value is returned.
      Specified by:
      getShort in class HttpHeaders
      Parameters:
      name - the name of the header to search
      defaultValue - the default value
      Returns:
      the first header value if the header is found and its value is a short. defaultValue if there's no such header or its value is not a short.
    • getTimeMillis

      public Long getTimeMillis(CharSequence name)
      Description copied from class: HttpHeaders
      Returns the date value of a header with the specified name. If there are more than one values for the specified name, the first value is returned.
      Specified by:
      getTimeMillis in class HttpHeaders
      Parameters:
      name - the name of the header to search
      Returns:
      the first header value if the header is found and its value is a date. null if there's no such header or its value is not a date.
    • getTimeMillis

      public long getTimeMillis(CharSequence name, long defaultValue)
      Description copied from class: HttpHeaders
      Returns the date value of a header with the specified name. If there are more than one values for the specified name, the first value is returned.
      Specified by:
      getTimeMillis in class HttpHeaders
      Parameters:
      name - the name of the header to search
      defaultValue - the default value
      Returns:
      the first header value if the header is found and its value is a date. defaultValue if there's no such header or its value is not a date.
    • getAll

      public List<String> getAll(String name)
      Specified by:
      getAll in class HttpHeaders
      See Also:
      • HttpHeaders.getAll(CharSequence)
    • entries

      public List<Map.Entry<String,String>> entries()
      Description copied from class: HttpHeaders
      Returns a new List that contains all headers in this object. Note that modifying the returned List will not affect the state of this object. If you intend to enumerate over the header entries only, use HttpHeaders.iterator() instead, which has much less overhead.
      Specified by:
      entries in class HttpHeaders
      See Also:
      • HttpHeaders.iteratorCharSequence()
    • contains

      public boolean contains(String name)
      Specified by:
      contains in class HttpHeaders
      See Also:
      • HttpHeaders.contains(CharSequence)
    • isEmpty

      public boolean isEmpty()
      Description copied from class: HttpHeaders
      Checks if no header exists.
      Specified by:
      isEmpty in class HttpHeaders
    • size

      public int size()
      Description copied from class: HttpHeaders
      Returns the number of headers in this object.
      Specified by:
      size in class HttpHeaders
    • names

      public Set<String> names()
      Description copied from class: HttpHeaders
      Returns a new Set that contains the names of all headers in this object. Note that modifying the returned Set will not affect the state of this object. If you intend to enumerate over the header entries only, use HttpHeaders.iterator() instead, which has much less overhead.
      Specified by:
      names in class HttpHeaders
    • add

      public HttpHeaders add(String name, Object value)
      Specified by:
      add in class HttpHeaders
      See Also:
      • HttpHeaders.add(CharSequence, Object)
    • add

      public HttpHeaders add(String name, Iterable<?> values)
      Specified by:
      add in class HttpHeaders
      See Also:
      • HttpHeaders.add(CharSequence, Iterable)
    • addInt

      public HttpHeaders addInt(CharSequence name, int value)
      Description copied from class: HttpHeaders
      Add the name to value.
      Specified by:
      addInt in class HttpHeaders
      Parameters:
      name - The name to modify
      value - The value
      Returns:
      this
    • addShort

      public HttpHeaders addShort(CharSequence name, short value)
      Description copied from class: HttpHeaders
      Add the name to value.
      Specified by:
      addShort in class HttpHeaders
      Parameters:
      name - The name to modify
      value - The value
      Returns:
      this
    • set

      public HttpHeaders set(String name, Object value)
      Specified by:
      set in class HttpHeaders
      See Also:
      • HttpHeaders.set(CharSequence, Object)
    • set

      public HttpHeaders set(String name, Iterable<?> values)
      Specified by:
      set in class HttpHeaders
      See Also:
      • HttpHeaders.set(CharSequence, Iterable)
    • setInt

      public HttpHeaders setInt(CharSequence name, int value)
      Description copied from class: HttpHeaders
      Set the name to value. This will remove all previous values associated with name.
      Specified by:
      setInt in class HttpHeaders
      Parameters:
      name - The name to modify
      value - The value
      Returns:
      this
    • setShort

      public HttpHeaders setShort(CharSequence name, short value)
      Description copied from class: HttpHeaders
      Set the name to value. This will remove all previous values associated with name.
      Specified by:
      setShort in class HttpHeaders
      Parameters:
      name - The name to modify
      value - The value
      Returns:
      this
    • remove

      public HttpHeaders remove(String name)
      Specified by:
      remove in class HttpHeaders
      See Also:
      • HttpHeaders.remove(CharSequence)
    • clear

      public HttpHeaders clear()
      Description copied from class: HttpHeaders
      Removes all headers from this HttpMessage.
      Specified by:
      clear in class HttpHeaders
      Returns:
      this
    • iterator

      public Iterator<Map.Entry<String,String>> iterator()
      Specified by:
      iterator in interface Iterable<Map.Entry<String,String>>
      Specified by:
      iterator in class HttpHeaders
    • iteratorCharSequence

      public Iterator<Map.Entry<CharSequence, CharSequence>> iteratorCharSequence()
      Specified by:
      iteratorCharSequence in class HttpHeaders
      Returns:
      Iterator over the name/value header pairs.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.