77import java .io .InputStream ;
88import java .lang .reflect .Type ;
99import java .util .ArrayList ;
10- import java .util .Date ;
1110import java .util .HashMap ;
1211import java .util .Map ;
1312
@@ -119,7 +118,7 @@ final boolean loadMore() throws IOException {
119118 eof = true ;
120119 return false ;
121120 } else {
122- throw new IOException ("read returned " + n );
121+ throw new IOException ("readAny returned " + n );
123122 }
124123 } else {
125124 head = 0 ;
@@ -666,7 +665,7 @@ public final double readDouble() throws IOException {
666665 return Double .valueOf (readNumber ());
667666 }
668667
669- public final Object read () throws IOException {
668+ public final Object readAny () throws IOException {
670669 ValueType valueType = whatIsNext ();
671670 switch (valueType ) {
672671 case STRING :
@@ -680,7 +679,7 @@ public final Object read() throws IOException {
680679 case ARRAY :
681680 ArrayList list = new ArrayList ();
682681 while (readArray ()) {
683- list .add (read ());
682+ list .add (readAny ());
684683 }
685684 return list ;
686685 case OBJECT :
@@ -690,7 +689,7 @@ public final Object read() throws IOException {
690689 }
691690 return map ;
692691 default :
693- throw reportError ("read " , "unexpected value type: " + valueType );
692+ throw reportError ("readAny " , "unexpected value type: " + valueType );
694693 }
695694 }
696695
@@ -857,7 +856,7 @@ final void skipString() throws IOException {
857856 return ;
858857 }
859858 if (escaped ) {
860- head = 1 ; // skip the first char as last char read is \
859+ head = 1 ; // skip the first char as last char readAny is \
861860 }
862861 } else {
863862 head = end ;
0 commit comments