@@ -38,7 +38,18 @@ public class JSONTokener {
38
38
/**
39
39
* Construct a JSONTokener from a Reader. The caller must close the Reader.
40
40
*
41
- * @param reader A reader.
41
+ * @param reader the source.
42
+ */
43
+ public JSONTokener (Reader reader ) {
44
+ this (reader , new JSONParserConfiguration ());
45
+ }
46
+
47
+ /**
48
+ * Construct a JSONTokener from a Reader with a given JSONParserConfiguration. The caller must close the Reader.
49
+ *
50
+ * @param reader the source.
51
+ * @param jsonParserConfiguration A JSONParserConfiguration instance that controls the behavior of the parser.
52
+ *
42
53
*/
43
54
public JSONTokener (Reader reader , JSONParserConfiguration jsonParserConfiguration ) {
44
55
this .jsonParserConfiguration = jsonParserConfiguration ;
@@ -54,10 +65,6 @@ public JSONTokener(Reader reader, JSONParserConfiguration jsonParserConfiguratio
54
65
this .line = 1 ;
55
66
}
56
67
57
- public JSONTokener (Reader reader ) {
58
- this (reader , new JSONParserConfiguration ());
59
- }
60
-
61
68
/**
62
69
* Construct a JSONTokener from an InputStream. The caller must close the input stream.
63
70
* @param inputStream The source.
@@ -69,23 +76,29 @@ public JSONTokener(InputStream inputStream) {
69
76
/**
70
77
* Construct a JSONTokener from an InputStream. The caller must close the input stream.
71
78
* @param inputStream The source.
79
+ * @param jsonParserConfiguration A JSONParserConfiguration instance that controls the behavior of the parser.
72
80
*/
73
81
public JSONTokener (InputStream inputStream , JSONParserConfiguration jsonParserConfiguration ) {
74
- this (new InputStreamReader (inputStream , Charset .forName ("UTF-8" )),jsonParserConfiguration );
82
+ this (new InputStreamReader (inputStream , Charset .forName ("UTF-8" )), jsonParserConfiguration );
75
83
}
76
84
77
85
78
86
/**
79
87
* Construct a JSONTokener from a string.
80
88
*
81
- * @param s A source string.
89
+ * @param source A source string.
82
90
*/
83
- public JSONTokener (String s ) {
84
- this (new StringReader (s ));
91
+ public JSONTokener (String source ) {
92
+ this (new StringReader (source ));
85
93
}
86
94
87
- public JSONTokener (String s , JSONParserConfiguration jsonParserConfiguration ) {
88
- this (new StringReader (s ), jsonParserConfiguration );
95
+ /**
96
+ * Construct a JSONTokener from an InputStream. The caller must close the input stream.
97
+ * @param source The source.
98
+ * @param jsonParserConfiguration A JSONParserConfiguration instance that controls the behavior of the parser.
99
+ */
100
+ public JSONTokener (String source , JSONParserConfiguration jsonParserConfiguration ) {
101
+ this (new StringReader (source ), jsonParserConfiguration );
89
102
}
90
103
91
104
/**
0 commit comments