<!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.6.0_65) on Mon Oct 13 10:56:30 EDT 2014 --> <TITLE> JSONTokener </TITLE> <META NAME="date" CONTENT="2014-10-13"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="JSONTokener"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= 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="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="../../javapns/json/JSONStringer.html" title="class in javapns.json"><B>PREV CLASS</B></A> <A HREF="../../javapns/json/JSONWriter.html" title="class in javapns.json"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javapns/json/JSONTokener.html" target="_top"><B>FRAMES</B></A> <A HREF="JSONTokener.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <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"> javapns.json</FONT> <BR> Class JSONTokener</H2> <PRE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javapns.json.JSONTokener</B> </PRE> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../javapns/json/HTTPTokener.html" title="class in javapns.json">HTTPTokener</A>, <A HREF="../../javapns/json/XMLTokener.html" title="class in javapns.json">XMLTokener</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>JSONTokener</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> </PRE> <P> A JSONTokener takes a source string and extracts characters and tokens from it. It is used by the JSONObject and JSONArray constructors to parse JSON source strings. <P> <P> <DL> <DT><B>Version:</B></DT> <DD>2008-09-18</DD> <DT><B>Author:</B></DT> <DD>JSON.org</DD> </DL> <HR> <P> <!-- ======== 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="../../javapns/json/JSONTokener.html#JSONTokener(java.io.Reader)">JSONTokener</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> reader)</CODE> <BR> Construct a JSONTokener from a string.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#JSONTokener(java.lang.String)">JSONTokener</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</CODE> <BR> Construct a JSONTokener from a string.</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> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#back()">back</A></B>()</CODE> <BR> Back up one character.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#dehexchar(char)">dehexchar</A></B>(char c)</CODE> <BR> Get the hex value of a character (base16).</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="../../javapns/json/JSONTokener.html#more()">more</A></B>()</CODE> <BR> Determine if the source string still contains characters that next() can consume.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> char</CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#next()">next</A></B>()</CODE> <BR> Get the next character in the source string.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> char</CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#next(char)">next</A></B>(char c)</CODE> <BR> Consume the next character, and check that it matches a specified 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/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#next(int)">next</A></B>(int n)</CODE> <BR> Get the next n characters.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> char</CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#nextClean()">nextClean</A></B>()</CODE> <BR> Get the next char in the string, skipping whitespace.</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?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#nextString(char)">nextString</A></B>(char quote)</CODE> <BR> Return the characters up to the next close quote 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/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#nextTo(char)">nextTo</A></B>(char d)</CODE> <BR> Get the text up but not including the specified character or the end of line, whichever comes first.</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?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#nextTo(java.lang.String)">nextTo</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> delimiters)</CODE> <BR> Get the text up but not including one of the specified delimiter characters or the end of line, whichever comes first.</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?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#nextValue()">nextValue</A></B>()</CODE> <BR> Get the next value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> char</CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#skipTo(char)">skipTo</A></B>(char to)</CODE> <BR> Skip characters until the next character is the requested character.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#syntaxError(java.lang.String)">syntaxError</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> message)</CODE> <BR> Make a JSONException to signal a syntax error.</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?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../javapns/json/JSONTokener.html#toString()">toString</A></B>()</CODE> <BR> Make a printable string of this JSONTokener.</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?is-external=true" 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?is-external=true#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?is-external=true#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?is-external=true#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?is-external=true#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?is-external=true#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?is-external=true#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?is-external=true#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?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ========= 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="JSONTokener(java.io.Reader)"><!-- --></A><H3> JSONTokener</H3> <PRE> public <B>JSONTokener</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> reader)</PRE> <DL> <DD>Construct a JSONTokener from a string. <P> <DL> <DT><B>Parameters:</B><DD><CODE>reader</CODE> - A reader.</DL> </DL> <HR> <A NAME="JSONTokener(java.lang.String)"><!-- --></A><H3> JSONTokener</H3> <PRE> public <B>JSONTokener</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</PRE> <DL> <DD>Construct a JSONTokener from a string. <P> <DL> <DT><B>Parameters:</B><DD><CODE>s</CODE> - A source string.</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="back()"><!-- --></A><H3> back</H3> <PRE> public void <B>back</B>() throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Back up one character. This provides a sort of lookahead capability, so that you can test for a digit or letter before attempting to parse the next number or identifier. <P> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></DL> </DD> </DL> <HR> <A NAME="dehexchar(char)"><!-- --></A><H3> dehexchar</H3> <PRE> public static int <B>dehexchar</B>(char c)</PRE> <DL> <DD>Get the hex value of a character (base16). <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>c</CODE> - A character between '0' and '9' or between 'A' and 'F' or between 'a' and 'f'. <DT><B>Returns:</B><DD>An int between 0 and 15, or -1 if c was not a hex digit.</DL> </DD> </DL> <HR> <A NAME="more()"><!-- --></A><H3> more</H3> <PRE> public boolean <B>more</B>() throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Determine if the source string still contains characters that next() can consume. <P> <DD><DL> <DT><B>Returns:</B><DD>true if not yet at the end of the source. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></DL> </DD> </DL> <HR> <A NAME="next()"><!-- --></A><H3> next</H3> <PRE> public char <B>next</B>() throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Get the next character in the source string. <P> <DD><DL> <DT><B>Returns:</B><DD>The next character, or 0 if past the end of the source string. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></DL> </DD> </DL> <HR> <A NAME="next(char)"><!-- --></A><H3> next</H3> <PRE> public char <B>next</B>(char c) throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Consume the next character, and check that it matches a specified character. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>c</CODE> - The character to match. <DT><B>Returns:</B><DD>The character. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE> - if the character does not match.</DL> </DD> </DL> <HR> <A NAME="next(int)"><!-- --></A><H3> next</H3> <PRE> public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>next</B>(int n) throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Get the next n characters. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>n</CODE> - The number of characters to take. <DT><B>Returns:</B><DD>A string of n characters. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE> - Substring bounds error if there are not n characters remaining in the source string.</DL> </DD> </DL> <HR> <A NAME="nextClean()"><!-- --></A><H3> nextClean</H3> <PRE> public char <B>nextClean</B>() throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Get the next char in the string, skipping whitespace. <P> <DD><DL> <DT><B>Returns:</B><DD>A character, or 0 if there are no more characters. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></DL> </DD> </DL> <HR> <A NAME="nextString(char)"><!-- --></A><H3> nextString</H3> <PRE> public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>nextString</B>(char quote) throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Return the characters up to the next close quote character. Backslash processing is done. The formal JSON format does not allow strings in single quotes, but an implementation is allowed to accept them. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>quote</CODE> - The quoting character, either <code>"</code> <small>(double quote)</small> or <code>'</code> <small>(single quote)</small>. <DT><B>Returns:</B><DD>A String. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE> - Unterminated string.</DL> </DD> </DL> <HR> <A NAME="nextTo(char)"><!-- --></A><H3> nextTo</H3> <PRE> public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>nextTo</B>(char d) throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Get the text up but not including the specified character or the end of line, whichever comes first. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>d</CODE> - A delimiter character. <DT><B>Returns:</B><DD>A string. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></DL> </DD> </DL> <HR> <A NAME="nextTo(java.lang.String)"><!-- --></A><H3> nextTo</H3> <PRE> public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>nextTo</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> delimiters) throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Get the text up but not including one of the specified delimiter characters or the end of line, whichever comes first. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>delimiters</CODE> - A set of delimiter characters. <DT><B>Returns:</B><DD>A string, trimmed. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></DL> </DD> </DL> <HR> <A NAME="nextValue()"><!-- --></A><H3> nextValue</H3> <PRE> public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>nextValue</B>() throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Get the next value. The value can be a Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object. <P> <DD><DL> <DT><B>Returns:</B><DD>An object. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE> - If syntax error.</DL> </DD> </DL> <HR> <A NAME="skipTo(char)"><!-- --></A><H3> skipTo</H3> <PRE> public char <B>skipTo</B>(char to) throws <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></PRE> <DL> <DD>Skip characters until the next character is the requested character. If the requested character is not found, no characters are skipped. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>to</CODE> - A character to skip to. <DT><B>Returns:</B><DD>The requested character, or zero if the requested character is not found. <DT><B>Throws:</B> <DD><CODE><A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A></CODE></DL> </DD> </DL> <HR> <A NAME="syntaxError(java.lang.String)"><!-- --></A><H3> syntaxError</H3> <PRE> public <A HREF="../../javapns/json/JSONException.html" title="class in javapns.json">JSONException</A> <B>syntaxError</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> message)</PRE> <DL> <DD>Make a JSONException to signal a syntax error. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>message</CODE> - The error message. <DT><B>Returns:</B><DD>A JSONException object, suitable for throwing</DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> <DL> <DD>Make a printable string of this JSONTokener. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>" at character [this.index]"</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="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="../../javapns/json/JSONStringer.html" title="class in javapns.json"><B>PREV CLASS</B></A> <A HREF="../../javapns/json/JSONWriter.html" title="class in javapns.json"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javapns/json/JSONTokener.html" target="_top"><B>FRAMES</B></A> <A HREF="JSONTokener.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <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> </BODY> </HTML>