org.trialox.jaxrs.util
Class HttpHeaderReader

java.lang.Object
  extended by org.trialox.jaxrs.util.HttpHeaderReader
Direct Known Subclasses:
HttpHeaderListAdapter, HttpHeaderReaderImpl

public abstract class HttpHeaderReader
extends java.lang.Object

taken from jersey


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 newHttpHeaderReader(java.lang.String header)
           
static HttpHeaderReader newHttpHeaderReader(java.lang.String header, boolean processComments)
           
abstract  HttpHeaderReader.Event next()
           
abstract  HttpHeaderReader.Event next(boolean skipWhiteSpace)
           
 java.lang.String nextQuotedString()
           
 char nextSeparator()
           
 void nextSeparator(char c)
           
 java.lang.String nextToken()
           
 java.lang.String nextTokenOrQuotedString()
           
static
<T extends QualityFactor>
java.util.List<T>
readAcceptableList(HttpHeaderReader.ListElementCreator<T> c, 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 java.util.Map<java.lang.String,java.lang.String> readParameters(HttpHeaderReader reader)
           
static int readQualityFactor(java.lang.String q)
           
static int readQualityFactorParameter(HttpHeaderReader reader)
           
 
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

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

newHttpHeaderReader

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

newHttpHeaderReader

public static HttpHeaderReader newHttpHeaderReader(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

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

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


Copyright © 2008. All Rights Reserved.