7
7
import java .io .InputStream ;
8
8
import java .lang .reflect .Type ;
9
9
import java .util .ArrayList ;
10
- import java .util .Date ;
11
10
import java .util .HashMap ;
12
11
import java .util .Map ;
13
12
@@ -119,7 +118,7 @@ final boolean loadMore() throws IOException {
119
118
eof = true ;
120
119
return false ;
121
120
} else {
122
- throw new IOException ("read returned " + n );
121
+ throw new IOException ("readAny returned " + n );
123
122
}
124
123
} else {
125
124
head = 0 ;
@@ -666,7 +665,7 @@ public final double readDouble() throws IOException {
666
665
return Double .valueOf (readNumber ());
667
666
}
668
667
669
- public final Object read () throws IOException {
668
+ public final Object readAny () throws IOException {
670
669
ValueType valueType = whatIsNext ();
671
670
switch (valueType ) {
672
671
case STRING :
@@ -680,7 +679,7 @@ public final Object read() throws IOException {
680
679
case ARRAY :
681
680
ArrayList list = new ArrayList ();
682
681
while (readArray ()) {
683
- list .add (read ());
682
+ list .add (readAny ());
684
683
}
685
684
return list ;
686
685
case OBJECT :
@@ -690,7 +689,7 @@ public final Object read() throws IOException {
690
689
}
691
690
return map ;
692
691
default :
693
- throw reportError ("read " , "unexpected value type: " + valueType );
692
+ throw reportError ("readAny " , "unexpected value type: " + valueType );
694
693
}
695
694
}
696
695
@@ -857,7 +856,7 @@ final void skipString() throws IOException {
857
856
return ;
858
857
}
859
858
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 \
861
860
}
862
861
} else {
863
862
head = end ;
0 commit comments