GeezerVison is showing netty.io — EmptyHttpHeaders (Netty API Reference (4.1.141.Final))
Class EmptyHttpHeaders
-
-
Field Summary
Fields
Modifier and Type
Field
Description
-
Constructor Summary
Constructors
Modifier
Constructor
Description
protected
-
Method Summary
Modifier and Type
Method
Description
boolean
Returns a new List that contains all headers in this object.
Returns the integer value of a header with the specified name.
int
Returns the integer value of a header with the specified name.
Returns the short value of a header with the specified name.
short
Returns the short value of a header with the specified name.
Returns the date value of a header with the specified name.
long
Returns the date value of a header with the specified name.
boolean
Checks if no header exists.
Returns a new Set that contains the names of all headers in this object.
int
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
Adds all header entries of the specified headers.
Adds a new header with the specified name and values.
Adds a new header with the specified name and value.
static void
static void
static void
static void
static void
static void
static void
boolean
Checks to see if there is a header with the specified name
boolean
Returns true if a header with the name and value exists, false otherwise.
boolean
boolean
Returns true if a header with the name and value exists, false otherwise.
static void
static boolean
Returns the value of a header with the specified name.
Returns the value of a header with the specified name.
Returns the values of headers with the specified name
static long
static long
static int
static int
static int
static int
static boolean
static boolean
static boolean
static boolean
Removes the header with the specified name.
static void
static void
static void
Cleans the current header entries and copies all header entries of the specified headers.
Sets a header with the specified name and values.
Sets a header with the specified name and value.
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
static void
-
-
Constructor Details
-
EmptyHttpHeaders
protected EmptyHttpHeaders()
-
Method Details
-
-
getInt
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
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
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)
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
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)
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.
-
-
entries
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:
-
-
-
isEmpty
public boolean isEmpty()
Checks if no header exists.
- Specified by:
isEmpty in class HttpHeaders
-
size
public int size()
Returns the number of headers in this object.
- Specified by:
size in class HttpHeaders
-
names
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
-
-
-
addInt
Add the name to value.
- Specified by:
addInt in class HttpHeaders
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
addShort
Add the name to value.
- Specified by:
addShort in class HttpHeaders
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
-
-
setInt
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
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
-
-
-
-
|