|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.clerezza.triaxrs.util.AcceptCharset
public class AcceptCharset
Represent HTTP Accept-Charset header.
This version of the API does not support construction.
| Nested Class Summary | |
|---|---|
static class |
AcceptCharset.ValuedCharset
|
| Constructor Summary | |
|---|---|
AcceptCharset(String acceptCharset,
List<String> acceptableCharsets,
List<String> bannedCharsets,
boolean anyCharsetAllowed,
List<AcceptCharset.ValuedCharset> valuedCharsets)
|
|
| Method Summary | |
|---|---|
List<String> |
getAcceptableCharsets()
Provide a list of character sets which are acceptable for the client. |
String |
getAcceptCharsetHeader()
|
List<String> |
getBannedCharsets()
A list of non-acceptable (q-value 0) character sets, i.e. |
List<AcceptCharset.ValuedCharset> |
getValuedCharsets()
|
boolean |
isAnyCharsetAllowed()
Is any character set acceptable? Note that expressions are listed by getBannedCharsets(). |
String |
toString()
|
static AcceptCharset |
valueOf(String value)
Creates a new instance of AcceptCharset by parsing the supplied string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AcceptCharset(String acceptCharset,
List<String> acceptableCharsets,
List<String> bannedCharsets,
boolean anyCharsetAllowed,
List<AcceptCharset.ValuedCharset> valuedCharsets)
| Method Detail |
|---|
public List<String> getAcceptableCharsets()
isAnyCharsetAllowed()), only character sets more preferable than
wildcard are listed.
null; the list is sorted
starting with the most preferable charsetpublic boolean isAnyCharsetAllowed()
getBannedCharsets(). This means that the value contains wildcard
(with non-zero priority) of the header is not present at all.
true if any character set is acceptablepublic List<String> getBannedCharsets()
isAnyCharsetAllowed().
null; always empty if wildcard is not included
public static AcceptCharset valueOf(String value)
throws IllegalArgumentException
value - the Accept-Charset string
IllegalArgumentException - if the supplied string cannot be parsedpublic String getAcceptCharsetHeader()
public List<AcceptCharset.ValuedCharset> getValuedCharsets()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||