| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.5.0_22) on Tue Sep 18 20:44:14 GMT+01:00 2012 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| BasicTokenIterator (HttpComponents Core 4.2.2 API) |
| </TITLE> |
| |
| <META NAME="keywords" CONTENT="org.apache.http.message.BasicTokenIterator class"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| parent.document.title="BasicTokenIterator (HttpComponents Core 4.2.2 API)"; |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BasicTokenIterator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/http/message/BasicStatusLine.html" title="class in org.apache.http.message"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/http/message/BufferedHeader.html" title="class in org.apache.http.message"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/http/message/BasicTokenIterator.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="BasicTokenIterator.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.http.message</FONT> |
| <BR> |
| Class BasicTokenIterator</H2> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.http.message.BasicTokenIterator</B> |
| </PRE> |
| <DL> |
| <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A><<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>>, <A HREF="../../../../org/apache/http/TokenIterator.html" title="interface in org.apache.http">TokenIterator</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE><FONT SIZE="-1"><A HREF="../../../../org/apache/http/annotation/NotThreadSafe.html" title="annotation in org.apache.http.annotation">@NotThreadSafe</A> |
| </FONT>public class <B>BasicTokenIterator</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../org/apache/http/TokenIterator.html" title="interface in org.apache.http">TokenIterator</A></DL> |
| </PRE> |
| |
| <P> |
| Basic implementation of a <A HREF="../../../../org/apache/http/TokenIterator.html" title="interface in org.apache.http"><CODE>TokenIterator</CODE></A>. |
| This implementation parses <tt>#token<tt> sequences as |
| defined by RFC 2616, section 2. |
| It extends that definition somewhat beyond US-ASCII. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>4.0</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentHeader">currentHeader</A></B></CODE> |
| |
| <BR> |
| The value of the current header.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken">currentToken</A></B></CODE> |
| |
| <BR> |
| The token to be returned by the next call to <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken"><CODE>currentToken</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/apache/http/HeaderIterator.html" title="interface in org.apache.http">HeaderIterator</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#headerIt">headerIt</A></B></CODE> |
| |
| <BR> |
| The iterator from which to obtain the next header.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#HTTP_SEPARATORS">HTTP_SEPARATORS</A></B></CODE> |
| |
| <BR> |
| The HTTP separator characters.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#searchPos">searchPos</A></B></CODE> |
| |
| <BR> |
| The position after <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken"><CODE>currentToken</CODE></A> in <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentHeader"><CODE>currentHeader</CODE></A>.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#BasicTokenIterator(org.apache.http.HeaderIterator)">BasicTokenIterator</A></B>(<A HREF="../../../../org/apache/http/HeaderIterator.html" title="interface in org.apache.http">HeaderIterator</A> headerIterator)</CODE> |
| |
| <BR> |
| Creates a new instance of <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html" title="class in org.apache.http.message"><CODE>BasicTokenIterator</CODE></A>.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#createToken(java.lang.String, int, int)">createToken</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value, |
| int start, |
| int end)</CODE> |
| |
| <BR> |
| Creates a new token to be returned.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#findNext(int)">findNext</A></B>(int from)</CODE> |
| |
| <BR> |
| Determines the next token.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#findTokenEnd(int)">findTokenEnd</A></B>(int from)</CODE> |
| |
| <BR> |
| Determines the ending position of the current token.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#findTokenSeparator(int)">findTokenSeparator</A></B>(int from)</CODE> |
| |
| <BR> |
| Determines the position of the next token separator.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#findTokenStart(int)">findTokenStart</A></B>(int from)</CODE> |
| |
| <BR> |
| Determines the starting position of the next token.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#hasNext()">hasNext</A></B>()</CODE> |
| |
| <BR> |
| Indicates whether there is another token in this iteration.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#isHttpSeparator(char)">isHttpSeparator</A></B>(char ch)</CODE> |
| |
| <BR> |
| Checks whether a character is an HTTP separator.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#isTokenChar(char)">isTokenChar</A></B>(char ch)</CODE> |
| |
| <BR> |
| Checks whether a character is a valid token character.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#isTokenSeparator(char)">isTokenSeparator</A></B>(char ch)</CODE> |
| |
| <BR> |
| Checks whether a character is a token separator.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#isWhitespace(char)">isWhitespace</A></B>(char ch)</CODE> |
| |
| <BR> |
| Checks whether a character is a whitespace character.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#next()">next</A></B>()</CODE> |
| |
| <BR> |
| Returns the next token.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#nextToken()">nextToken</A></B>()</CODE> |
| |
| <BR> |
| Obtains the next token from this iteration.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#remove()">remove</A></B>()</CODE> |
| |
| <BR> |
| Removing tokens is not supported.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="HTTP_SEPARATORS"><!-- --></A><H3> |
| HTTP_SEPARATORS</H3> |
| <PRE> |
| public static final <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>HTTP_SEPARATORS</B></PRE> |
| <DL> |
| <DD>The HTTP separator characters. Defined in RFC 2616, section 2.2. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.http.message.BasicTokenIterator.HTTP_SEPARATORS">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="headerIt"><!-- --></A><H3> |
| headerIt</H3> |
| <PRE> |
| protected final <A HREF="../../../../org/apache/http/HeaderIterator.html" title="interface in org.apache.http">HeaderIterator</A> <B>headerIt</B></PRE> |
| <DL> |
| <DD>The iterator from which to obtain the next header. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="currentHeader"><!-- --></A><H3> |
| currentHeader</H3> |
| <PRE> |
| protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>currentHeader</B></PRE> |
| <DL> |
| <DD>The value of the current header. |
| This is the header value that includes <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken"><CODE>currentToken</CODE></A>. |
| Undefined if the iteration is over. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="currentToken"><!-- --></A><H3> |
| currentToken</H3> |
| <PRE> |
| protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>currentToken</B></PRE> |
| <DL> |
| <DD>The token to be returned by the next call to <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken"><CODE>currentToken</CODE></A>. |
| <code>null</code> if the iteration is over. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="searchPos"><!-- --></A><H3> |
| searchPos</H3> |
| <PRE> |
| protected int <B>searchPos</B></PRE> |
| <DL> |
| <DD>The position after <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken"><CODE>currentToken</CODE></A> in <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentHeader"><CODE>currentHeader</CODE></A>. |
| Undefined if the iteration is over. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="BasicTokenIterator(org.apache.http.HeaderIterator)"><!-- --></A><H3> |
| BasicTokenIterator</H3> |
| <PRE> |
| public <B>BasicTokenIterator</B>(<A HREF="../../../../org/apache/http/HeaderIterator.html" title="interface in org.apache.http">HeaderIterator</A> headerIterator)</PRE> |
| <DL> |
| <DD>Creates a new instance of <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html" title="class in org.apache.http.message"><CODE>BasicTokenIterator</CODE></A>. |
| <P> |
| <DL> |
| <DT><B>Parameters:</B><DD><CODE>headerIterator</CODE> - the iterator for the headers to tokenize</DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="hasNext()"><!-- --></A><H3> |
| hasNext</H3> |
| <PRE> |
| public boolean <B>hasNext</B>()</PRE> |
| <DL> |
| <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/http/TokenIterator.html#hasNext()">TokenIterator</A></CODE></B></DD> |
| <DD>Indicates whether there is another token in this iteration. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html#hasNext()" title="class or interface in java.util">hasNext</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A><<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/http/TokenIterator.html#hasNext()">hasNext</A></CODE> in interface <CODE><A HREF="../../../../org/apache/http/TokenIterator.html" title="interface in org.apache.http">TokenIterator</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD><code>true</code> if there is another token, |
| <code>false</code> otherwise</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="nextToken()"><!-- --></A><H3> |
| nextToken</H3> |
| <PRE> |
| public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>nextToken</B>() |
| throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/NoSuchElementException.html" title="class or interface in java.util">NoSuchElementException</A>, |
| <A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></PRE> |
| <DL> |
| <DD>Obtains the next token from this iteration. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/http/TokenIterator.html#nextToken()">nextToken</A></CODE> in interface <CODE><A HREF="../../../../org/apache/http/TokenIterator.html" title="interface in org.apache.http">TokenIterator</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the next token in this iteration |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/NoSuchElementException.html" title="class or interface in java.util">NoSuchElementException</A></CODE> - if the iteration is already over |
| <DD><CODE><A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></CODE> - if an invalid header value is encountered</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="next()"><!-- --></A><H3> |
| next</H3> |
| <PRE> |
| public final <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>next</B>() |
| throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/NoSuchElementException.html" title="class or interface in java.util">NoSuchElementException</A>, |
| <A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></PRE> |
| <DL> |
| <DD>Returns the next token. |
| Same as <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#nextToken()"><CODE>nextToken()</CODE></A>, but with generic return type. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html#next()" title="class or interface in java.util">next</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A><<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE></DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the next token in this iteration |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/NoSuchElementException.html" title="class or interface in java.util">NoSuchElementException</A></CODE> - if there are no more tokens |
| <DD><CODE><A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></CODE> - if an invalid header value is encountered</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="remove()"><!-- --></A><H3> |
| remove</H3> |
| <PRE> |
| public final void <B>remove</B>() |
| throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></PRE> |
| <DL> |
| <DD>Removing tokens is not supported. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html#remove()" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A><<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE></DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - always</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="findNext(int)"><!-- --></A><H3> |
| findNext</H3> |
| <PRE> |
| protected int <B>findNext</B>(int from) |
| throws <A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></PRE> |
| <DL> |
| <DD>Determines the next token. |
| If found, the token is stored in <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken"><CODE>currentToken</CODE></A>. |
| The return value indicates the position after the token |
| in <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentHeader"><CODE>currentHeader</CODE></A>. If necessary, the next header |
| will be obtained from <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#headerIt"><CODE>headerIt</CODE></A>. |
| If not found, <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#currentToken"><CODE>currentToken</CODE></A> is set to <code>null</code>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>from</CODE> - the position in the current header at which to |
| start the search, -1 to search in the first header |
| <DT><B>Returns:</B><DD>the position after the found token in the current header, or |
| negative if there was no next token |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></CODE> - if an invalid header value is encountered</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createToken(java.lang.String, int, int)"><!-- --></A><H3> |
| createToken</H3> |
| <PRE> |
| protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>createToken</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value, |
| int start, |
| int end)</PRE> |
| <DL> |
| <DD>Creates a new token to be returned. |
| Called from <A HREF="../../../../org/apache/http/message/BasicTokenIterator.html#findNext(int)"><CODE>findNext</CODE></A> after the token is identified. |
| The default implementation simply calls |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html#substring(int)" title="class or interface in java.lang"><CODE>String.substring</CODE></A>. |
| <br/> |
| If header values are significantly longer than tokens, and some |
| tokens are permanently referenced by the application, there can |
| be problems with garbage collection. A substring will hold a |
| reference to the full characters of the original string and |
| therefore occupies more memory than might be expected. |
| To avoid this, override this method and create a new string |
| instead of a substring. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>value</CODE> - the full header value from which to create a token<DD><CODE>start</CODE> - the index of the first token character<DD><CODE>end</CODE> - the index after the last token character |
| <DT><B>Returns:</B><DD>a string representing the token identified by the arguments</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="findTokenStart(int)"><!-- --></A><H3> |
| findTokenStart</H3> |
| <PRE> |
| protected int <B>findTokenStart</B>(int from)</PRE> |
| <DL> |
| <DD>Determines the starting position of the next token. |
| This method will iterate over headers if necessary. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>from</CODE> - the position in the current header at which to |
| start the search |
| <DT><B>Returns:</B><DD>the position of the token start in the current header, |
| negative if no token start could be found</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="findTokenSeparator(int)"><!-- --></A><H3> |
| findTokenSeparator</H3> |
| <PRE> |
| protected int <B>findTokenSeparator</B>(int from)</PRE> |
| <DL> |
| <DD>Determines the position of the next token separator. |
| Because of multi-header joining rules, the end of a |
| header value is a token separator. This method does |
| therefore not need to iterate over headers. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>from</CODE> - the position in the current header at which to |
| start the search |
| <DT><B>Returns:</B><DD>the position of a token separator in the current header, |
| or at the end |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></CODE> - if a new token is found before a token separator. |
| RFC 2616, section 2.1 explicitly requires a comma between |
| tokens for <tt>#</tt>.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="findTokenEnd(int)"><!-- --></A><H3> |
| findTokenEnd</H3> |
| <PRE> |
| protected int <B>findTokenEnd</B>(int from)</PRE> |
| <DL> |
| <DD>Determines the ending position of the current token. |
| This method will not leave the current header value, |
| since the end of the header value is a token boundary. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>from</CODE> - the position of the first character of the token |
| <DT><B>Returns:</B><DD>the position after the last character of the token. |
| The behavior is undefined if <code>from</code> does not |
| point to a token character in the current header value.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isTokenSeparator(char)"><!-- --></A><H3> |
| isTokenSeparator</H3> |
| <PRE> |
| protected boolean <B>isTokenSeparator</B>(char ch)</PRE> |
| <DL> |
| <DD>Checks whether a character is a token separator. |
| RFC 2616, section 2.1 defines comma as the separator for |
| <tt>#token</tt> sequences. The end of a header value will |
| also separate tokens, but that is not a character check. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>ch</CODE> - the character to check |
| <DT><B>Returns:</B><DD><code>true</code> if the character is a token separator, |
| <code>false</code> otherwise</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isWhitespace(char)"><!-- --></A><H3> |
| isWhitespace</H3> |
| <PRE> |
| protected boolean <B>isWhitespace</B>(char ch)</PRE> |
| <DL> |
| <DD>Checks whether a character is a whitespace character. |
| RFC 2616, section 2.2 defines space and horizontal tab as whitespace. |
| The optional preceeding line break is irrelevant, since header |
| continuation is handled transparently when parsing messages. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>ch</CODE> - the character to check |
| <DT><B>Returns:</B><DD><code>true</code> if the character is whitespace, |
| <code>false</code> otherwise</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isTokenChar(char)"><!-- --></A><H3> |
| isTokenChar</H3> |
| <PRE> |
| protected boolean <B>isTokenChar</B>(char ch)</PRE> |
| <DL> |
| <DD>Checks whether a character is a valid token character. |
| Whitespace, control characters, and HTTP separators are not |
| valid token characters. The HTTP specification (RFC 2616, section 2.2) |
| defines tokens only for the US-ASCII character set, this |
| method extends the definition to other character sets. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>ch</CODE> - the character to check |
| <DT><B>Returns:</B><DD><code>true</code> if the character is a valid token start, |
| <code>false</code> otherwise</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isHttpSeparator(char)"><!-- --></A><H3> |
| isHttpSeparator</H3> |
| <PRE> |
| protected boolean <B>isHttpSeparator</B>(char ch)</PRE> |
| <DL> |
| <DD>Checks whether a character is an HTTP separator. |
| The implementation in this class checks only for the HTTP separators |
| defined in RFC 2616, section 2.2. If you need to detect other |
| separators beyond the US-ASCII character set, override this method. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>ch</CODE> - the character to check |
| <DT><B>Returns:</B><DD><code>true</code> if the character is an HTTP separator</DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BasicTokenIterator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/http/message/BasicStatusLine.html" title="class in org.apache.http.message"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/http/message/BufferedHeader.html" title="class in org.apache.http.message"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/http/message/BasicTokenIterator.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="BasicTokenIterator.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2005-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |