Class HttpHeaderReader
- java.lang.Object
-
- org.glassfish.jersey.message.internal.HttpHeaderReader
-
- Direct Known Subclasses:
HttpHeaderListAdapter
,HttpHeaderReaderImpl
public abstract class HttpHeaderReader extends java.lang.Object
An abstract pull-based reader of HTTP headers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpHeaderReader.Event
TODO javadoc.private static interface
HttpHeaderReader.ListElementCreator<T>
-
Field Summary
Fields Modifier and Type Field Description private static HttpHeaderReader.ListElementCreator<AcceptableMediaType>
ACCEPTABLE_MEDIA_TYPE_CREATOR
private static HttpHeaderReader.ListElementCreator<AcceptableToken>
ACCEPTABLE_TOKEN_CREATOR
private static HttpHeaderReader.ListElementCreator<AcceptableLanguageTag>
LANGUAGE_CREATOR
private static HttpHeaderReader.ListElementCreator<MatchingEntityTag>
MATCHING_ENTITY_TAG_CREATOR
private static HttpHeaderReader.ListElementCreator<javax.ws.rs.core.MediaType>
MEDIA_TYPE_CREATOR
private static HttpHeaderReader.ListElementCreator<QualitySourceMediaType>
QUALITY_SOURCE_MEDIA_TYPE_CREATOR
-
Constructor Summary
Constructors Constructor Description HttpHeaderReader()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract HttpHeaderReader.Event
getEvent()
FIXME remove.abstract java.lang.CharSequence
getEventValue()
TODO javadoc.abstract int
getIndex()
TODO javadoc.abstract java.lang.CharSequence
getRemainder()
TODO javadoc.abstract boolean
hasNext()
TODO javadoc.abstract boolean
hasNextSeparator(char separator, boolean skipWhiteSpace)
TODO javadoc.static HttpHeaderReader
newInstance(java.lang.String header)
TODO javadoc.static HttpHeaderReader
newInstance(java.lang.String header, boolean processComments)
TODO javadoc.abstract HttpHeaderReader.Event
next()
TODO javadoc.abstract HttpHeaderReader.Event
next(boolean skipWhiteSpace)
TODO javadoc.protected abstract HttpHeaderReader.Event
next(boolean skipWhiteSpace, boolean preserveBackslash)
TODO javadoc.java.lang.CharSequence
nextQuotedString()
TODO javadoc.protected abstract java.lang.CharSequence
nextSeparatedString(char startSeparator, char endSeparator)
FIXME remove.void
nextSeparator(char c)
TODO javadoc.java.lang.CharSequence
nextToken()
TODO javadoc.java.lang.CharSequence
nextTokenOrQuotedString()
TODO javadoc.private java.lang.CharSequence
nextTokenOrQuotedString(boolean preserveBackslash)
static java.util.List<AcceptableLanguageTag>
readAcceptLanguage(java.lang.String header)
TODO javadoc.static java.util.List<AcceptableMediaType>
readAcceptMediaType(java.lang.String header)
TODO javadoc.static java.util.List<AcceptableMediaType>
readAcceptMediaType(java.lang.String header, java.util.List<QualitySourceMediaType> priorityMediaTypes)
TODO javadoc.static java.util.List<AcceptableToken>
readAcceptToken(java.lang.String header)
TODO javadoc.static javax.ws.rs.core.Cookie
readCookie(java.lang.String header)
TODO javadoc.static java.util.Map<java.lang.String,javax.ws.rs.core.Cookie>
readCookies(java.lang.String header)
TODO javadoc.static java.util.Date
readDate(java.lang.String date)
TODO javadoc.private static <T> java.util.List<T>
readList(java.util.List<T> l, HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
private static <T> java.util.List<T>
readList(HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
static java.util.Set<MatchingEntityTag>
readMatchingEntityTag(java.lang.String header)
TODO javadoc.static java.util.List<javax.ws.rs.core.MediaType>
readMediaTypes(java.util.List<javax.ws.rs.core.MediaType> l, java.lang.String header)
TODO javadoc.static javax.ws.rs.core.NewCookie
readNewCookie(java.lang.String header)
TODO javadoc.static java.util.Map<java.lang.String,java.lang.String>
readParameters(HttpHeaderReader reader)
TODO javadoc.static java.util.Map<java.lang.String,java.lang.String>
readParameters(HttpHeaderReader reader, boolean fileNameFix)
TODO javadoc.private static <T> java.util.List<T>
readQualifiedList(java.util.Comparator<T> comparator, HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
private static <T extends Qualified>
java.util.List<T>readQualifiedList(HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
static int
readQualityFactor(java.lang.CharSequence q)
TODO javadoc.static int
readQualityFactorParameter(HttpHeaderReader reader)
TODO javadoc.static java.util.List<QualitySourceMediaType>
readQualitySourceMediaType(java.lang.String header)
FIXME use somewhere in production code or remove.static java.util.List<QualitySourceMediaType>
readQualitySourceMediaType(java.lang.String[] header)
TODO javadoc.static java.util.List<java.lang.String>
readStringList(java.lang.String header)
TODO javadoc.
-
-
-
Field Detail
-
MATCHING_ENTITY_TAG_CREATOR
private static final HttpHeaderReader.ListElementCreator<MatchingEntityTag> MATCHING_ENTITY_TAG_CREATOR
-
MEDIA_TYPE_CREATOR
private static final HttpHeaderReader.ListElementCreator<javax.ws.rs.core.MediaType> MEDIA_TYPE_CREATOR
-
ACCEPTABLE_MEDIA_TYPE_CREATOR
private static final HttpHeaderReader.ListElementCreator<AcceptableMediaType> ACCEPTABLE_MEDIA_TYPE_CREATOR
-
QUALITY_SOURCE_MEDIA_TYPE_CREATOR
private static final HttpHeaderReader.ListElementCreator<QualitySourceMediaType> QUALITY_SOURCE_MEDIA_TYPE_CREATOR
-
ACCEPTABLE_TOKEN_CREATOR
private static final HttpHeaderReader.ListElementCreator<AcceptableToken> ACCEPTABLE_TOKEN_CREATOR
-
LANGUAGE_CREATOR
private static final HttpHeaderReader.ListElementCreator<AcceptableLanguageTag> LANGUAGE_CREATOR
-
-
Method Detail
-
hasNext
public abstract boolean hasNext()
TODO javadoc.
-
hasNextSeparator
public abstract boolean hasNextSeparator(char separator, boolean skipWhiteSpace)
TODO javadoc.
-
next
public abstract HttpHeaderReader.Event next() throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
next
public abstract HttpHeaderReader.Event next(boolean skipWhiteSpace) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
next
protected abstract HttpHeaderReader.Event next(boolean skipWhiteSpace, boolean preserveBackslash) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
nextSeparatedString
protected abstract java.lang.CharSequence nextSeparatedString(char startSeparator, char endSeparator) throws java.text.ParseException
FIXME remove.- Throws:
java.text.ParseException
-
getEvent
protected abstract HttpHeaderReader.Event getEvent()
FIXME remove.
-
getEventValue
public abstract java.lang.CharSequence getEventValue()
TODO javadoc.
-
getRemainder
public abstract java.lang.CharSequence getRemainder()
TODO javadoc.
-
getIndex
public abstract int getIndex()
TODO javadoc.
-
nextToken
public final java.lang.CharSequence nextToken() throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
nextSeparator
public final void nextSeparator(char c) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
nextQuotedString
public final java.lang.CharSequence nextQuotedString() throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
nextTokenOrQuotedString
public final java.lang.CharSequence nextTokenOrQuotedString() throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
nextTokenOrQuotedString
private java.lang.CharSequence nextTokenOrQuotedString(boolean preserveBackslash) throws java.text.ParseException
- Throws:
java.text.ParseException
-
newInstance
public static HttpHeaderReader newInstance(java.lang.String header)
TODO javadoc.
-
newInstance
public static HttpHeaderReader newInstance(java.lang.String header, boolean processComments)
TODO javadoc.
-
readDate
public static java.util.Date readDate(java.lang.String date) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readQualityFactor
public static int readQualityFactor(java.lang.CharSequence q) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readQualityFactorParameter
public static int readQualityFactorParameter(HttpHeaderReader reader) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readParameters
public static java.util.Map<java.lang.String,java.lang.String> readParameters(HttpHeaderReader reader) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readParameters
public static java.util.Map<java.lang.String,java.lang.String> readParameters(HttpHeaderReader reader, boolean fileNameFix) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readCookies
public static java.util.Map<java.lang.String,javax.ws.rs.core.Cookie> readCookies(java.lang.String header)
TODO javadoc.
-
readCookie
public static javax.ws.rs.core.Cookie readCookie(java.lang.String header)
TODO javadoc.
-
readNewCookie
public static javax.ws.rs.core.NewCookie readNewCookie(java.lang.String header)
TODO javadoc.
-
readMatchingEntityTag
public static java.util.Set<MatchingEntityTag> readMatchingEntityTag(java.lang.String header) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readMediaTypes
public static java.util.List<javax.ws.rs.core.MediaType> readMediaTypes(java.util.List<javax.ws.rs.core.MediaType> l, java.lang.String header) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readAcceptMediaType
public static java.util.List<AcceptableMediaType> readAcceptMediaType(java.lang.String header) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readQualitySourceMediaType
public static java.util.List<QualitySourceMediaType> readQualitySourceMediaType(java.lang.String header) throws java.text.ParseException
FIXME use somewhere in production code or remove.- Throws:
java.text.ParseException
-
readQualitySourceMediaType
public static java.util.List<QualitySourceMediaType> readQualitySourceMediaType(java.lang.String[] header) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readAcceptMediaType
public static java.util.List<AcceptableMediaType> readAcceptMediaType(java.lang.String header, java.util.List<QualitySourceMediaType> priorityMediaTypes) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readAcceptToken
public static java.util.List<AcceptableToken> readAcceptToken(java.lang.String header) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readAcceptLanguage
public static java.util.List<AcceptableLanguageTag> readAcceptLanguage(java.lang.String header) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readQualifiedList
private static <T extends Qualified> java.util.List<T> readQualifiedList(HttpHeaderReader.ListElementCreator<T> c, java.lang.String header) throws java.text.ParseException
- Throws:
java.text.ParseException
-
readQualifiedList
private static <T> java.util.List<T> readQualifiedList(java.util.Comparator<T> comparator, HttpHeaderReader.ListElementCreator<T> c, java.lang.String header) throws java.text.ParseException
- Throws:
java.text.ParseException
-
readStringList
public static java.util.List<java.lang.String> readStringList(java.lang.String header) throws java.text.ParseException
TODO javadoc.- Throws:
java.text.ParseException
-
readList
private static <T> java.util.List<T> readList(HttpHeaderReader.ListElementCreator<T> c, java.lang.String header) throws java.text.ParseException
- Throws:
java.text.ParseException
-
readList
private static <T> java.util.List<T> readList(java.util.List<T> l, HttpHeaderReader.ListElementCreator<T> c, java.lang.String header) throws java.text.ParseException
- Throws:
java.text.ParseException
-
-