Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name of this header.
|
Constructor and Description |
---|
ContentEncodingHeader()
Constructs a new empty header.
|
ContentEncodingHeader(List<String> codings)
Constructs a new header with the provided content encodings.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
decode(InputStream in)
Returns an input stream that decodes the specified input stream, given
the content-codings that are specified in the
codings list. |
List<String> |
getCodings()
Returns the list of content codings.
|
String |
getName()
Returns the name of the header, as it would canonically appear within an
HTTP message.
|
List<String> |
getValues()
Returns the header as a list of strings.
|
static ContentEncodingHeader |
valueOf(Message<?> message)
Constructs a new header, initialized from the specified message.
|
static ContentEncodingHeader |
valueOf(String string)
Constructs a new header, initialized from the specified string value.
|
equals, getFirstValue, hashCode, toString
public static final String NAME
public ContentEncodingHeader()
public static ContentEncodingHeader valueOf(Message<?> message)
message
- The message to initialize the header from.public static ContentEncodingHeader valueOf(String string)
string
- The value to initialize the header from.public InputStream decode(InputStream in) throws IOException
codings
list.in
- the input stream to decode.IOException
- if an I/O exception occurs.UnsupportedEncodingException
- if an unsupported content-encoding is specified.public List<String> getCodings()
public String getName()
Header
public List<String> getValues()
Header
String
should represent the value component of the key-value
pair that makes up the HTTP header - as such, for some Header
implementations each String in this List
may contain multiple
token-separated values.
The List
returned from this method should not be expected to be
mutable. However, some subclasses of Header
may choose to
implement it as such.
Copyright © 2010-2018, ForgeRock All Rights Reserved.