com.sun.jersey.core.header.reader
Class HttpHeaderReader

java.lang.Object
  extended by com.sun.jersey.core.header.reader.HttpHeaderReader

public abstract class HttpHeaderReader
extends java.lang.Object

A pull-based reader of HTTP headers.

Author:
[email protected]

Nested Class Summary
static class HttpHeaderReader.Event
           
static interface HttpHeaderReader.ListElementCreator<T>
           
 
Constructor Summary
HttpHeaderReader()
           
 
Method Summary
abstract  HttpHeaderReader.Event getEvent()
           
abstract  java.lang.String getEventValue()
           
abstract  int getIndex()
           
abstract  java.lang.String getRemainder()
           
abstract  boolean hasNext()
           
abstract  boolean hasNextSeparator(char separator, boolean skipWhiteSpace)
           
static HttpHeaderReader newInstance(java.lang.String header)
           
static HttpHeaderReader newInstance(java.lang.String header, boolean processComments)
           
abstract  HttpHeaderReader.Event next()
           
abstract  HttpHeaderReader.Event next(boolean skipWhiteSpace)
           
 java.lang.String nextQuotedString()
           
abstract  java.lang.String nextSeparatedString(char startSeparator, char endSeparator)
           
 char nextSeparator()
           
 void nextSeparator(char c)
           
 java.lang.String nextToken()
           
 java.lang.String nextTokenOrQuotedString()
           
static
<T> java.util.List<T>
readAcceptableList(java.util.Comparator<T> comparator, HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
           
static
<T extends QualityFactor>
java.util.List<T>
readAcceptableList(HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
           
static java.util.List<AcceptableLanguageTag> readAcceptLanguage(java.lang.String header)
           
static java.util.List<AcceptableMediaType> readAcceptMediaType(java.lang.String header)
           
static java.util.List<AcceptableMediaType> readAcceptMediaType(java.lang.String header, java.util.List<QualitySourceMediaType> priorityMediaTypes)
           
static java.util.List<AcceptableToken> readAcceptToken(java.lang.String header)
           
static Cookie readCookie(java.lang.String header)
           
static java.util.Map<java.lang.String,Cookie> readCookies(java.lang.String header)
           
static java.util.Date readDate(java.lang.String date)
           
static
<T> java.util.List<T>
readList(HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
           
static
<T> java.util.List<T>
readList(java.util.List<T> l, HttpHeaderReader.ListElementCreator<T> c, java.lang.String header)
           
static java.util.Set<MatchingEntityTag> readMatchingEntityTag(java.lang.String header)
           
static java.util.List<MediaType> readMediaTypes(java.util.List<MediaType> l, java.lang.String header)
           
static NewCookie readNewCookie(java.lang.String header)
           
static java.util.Map<java.lang.String,java.lang.String> readParameters(HttpHeaderReader reader)
           
static int readQualityFactor(java.lang.String q)
           
static int readQualityFactorParameter(HttpHeaderReader reader)
           
static java.util.List<QualitySourceMediaType> readQualitySourceMediaType(java.lang.String header)
           
static java.util.List<QualitySourceMediaType> readQualitySourceMediaType(java.lang.String[] header)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHeaderReader

public HttpHeaderReader()
Method Detail

hasNext

public abstract boolean hasNext()

hasNextSeparator

public abstract boolean hasNextSeparator(char separator,
                                         boolean skipWhiteSpace)

next

public abstract HttpHeaderReader.Event next()
                                     throws java.text.ParseException
Throws:
java.text.ParseException

next

public abstract HttpHeaderReader.Event next(boolean skipWhiteSpace)
                                     throws java.text.ParseException
Throws:
java.text.ParseException

nextSeparatedString

public abstract java.lang.String nextSeparatedString(char startSeparator,
                                                     char endSeparator)
                                              throws java.text.ParseException
Throws:
java.text.ParseException

getEvent

public abstract HttpHeaderReader.Event getEvent()

getEventValue

public abstract java.lang.String getEventValue()

getRemainder

public abstract java.lang.String getRemainder()

getIndex

public abstract int getIndex()

nextToken

public java.lang.String nextToken()
                           throws java.text.ParseException
Throws:
java.text.ParseException

nextSeparator

public char nextSeparator()
                   throws java.text.ParseException
Throws:
java.text.ParseException

nextSeparator

public void nextSeparator(char c)
                   throws java.text.ParseException
Throws:
java.text.ParseException

nextQuotedString

public java.lang.String nextQuotedString()
                                  throws java.text.ParseException
Throws:
java.text.ParseException

nextTokenOrQuotedString

public java.lang.String nextTokenOrQuotedString()
                                         throws java.text.ParseException
Throws:
java.text.ParseException

newInstance

public static HttpHeaderReader newInstance(java.lang.String header)

newInstance

public static HttpHeaderReader newInstance(java.lang.String header,
                                           boolean processComments)

readDate

public static java.util.Date readDate(java.lang.String date)
                               throws java.text.ParseException
Throws:
java.text.ParseException

readQualityFactor

public static int readQualityFactor(java.lang.String q)
                             throws java.text.ParseException
Throws:
java.text.ParseException

readQualityFactorParameter

public static int readQualityFactorParameter(HttpHeaderReader reader)
                                      throws java.text.ParseException
Throws:
java.text.ParseException

readParameters

public static java.util.Map<java.lang.String,java.lang.String> readParameters(HttpHeaderReader reader)
                                                                       throws java.text.ParseException
Throws:
java.text.ParseException

readCookies

public static java.util.Map<java.lang.String,Cookie> readCookies(java.lang.String header)

readCookie

public static Cookie readCookie(java.lang.String header)

readNewCookie

public static NewCookie readNewCookie(java.lang.String header)

readMatchingEntityTag

public static java.util.Set<MatchingEntityTag> readMatchingEntityTag(java.lang.String header)
                                                              throws java.text.ParseException
Throws:
java.text.ParseException

readMediaTypes

public static java.util.List<MediaType> readMediaTypes(java.util.List<MediaType> l,
                                                       java.lang.String header)
                                                throws java.text.ParseException
Throws:
java.text.ParseException

readAcceptMediaType

public static java.util.List<AcceptableMediaType> readAcceptMediaType(java.lang.String header)
                                                               throws java.text.ParseException
Throws:
java.text.ParseException

readQualitySourceMediaType

public static java.util.List<QualitySourceMediaType> readQualitySourceMediaType(java.lang.String header)
                                                                         throws java.text.ParseException
Throws:
java.text.ParseException

readQualitySourceMediaType

public static java.util.List<QualitySourceMediaType> readQualitySourceMediaType(java.lang.String[] header)
                                                                         throws java.text.ParseException
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
Throws:
java.text.ParseException

readAcceptToken

public static java.util.List<AcceptableToken> readAcceptToken(java.lang.String header)
                                                       throws java.text.ParseException
Throws:
java.text.ParseException

readAcceptLanguage

public static java.util.List<AcceptableLanguageTag> readAcceptLanguage(java.lang.String header)
                                                                throws java.text.ParseException
Throws:
java.text.ParseException

readAcceptableList

public static <T extends QualityFactor> java.util.List<T> readAcceptableList(HttpHeaderReader.ListElementCreator<T> c,
                                                                             java.lang.String header)
                                                                  throws java.text.ParseException
Throws:
java.text.ParseException

readAcceptableList

public static <T> java.util.List<T> readAcceptableList(java.util.Comparator<T> comparator,
                                                       HttpHeaderReader.ListElementCreator<T> c,
                                                       java.lang.String header)
                                            throws java.text.ParseException
Throws:
java.text.ParseException

readList

public static <T> java.util.List<T> readList(HttpHeaderReader.ListElementCreator<T> c,
                                             java.lang.String header)
                                  throws java.text.ParseException
Throws:
java.text.ParseException

readList

public 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


Copyright © 2011 Oracle Corporation. All Rights Reserved.