@@ -93,33 +93,20 @@ public ReaderBasedJsonParser(IOContext ctxt, int features, Reader r,
93
93
/**********************************************************
94
94
*/
95
95
96
- @ Override
97
- public ObjectCodec getCodec () {
98
- return _objectCodec ;
99
- }
100
-
101
- @ Override
102
- public void setCodec (ObjectCodec c ) {
103
- _objectCodec = c ;
104
- }
96
+ @ Override public ObjectCodec getCodec () { return _objectCodec ; }
97
+ @ Override public void setCodec (ObjectCodec c ) { _objectCodec = c ; }
105
98
106
99
@ Override
107
- public int releaseBuffered (Writer w ) throws IOException
108
- {
100
+ public int releaseBuffered (Writer w ) throws IOException {
109
101
int count = _inputEnd - _inputPtr ;
110
- if (count < 1 ) {
111
- return 0 ;
112
- }
102
+ if (count < 1 ) { return 0 ; }
113
103
// let's just advance ptr to end
114
104
int origPtr = _inputPtr ;
115
105
w .write (_inputBuffer , origPtr , count );
116
106
return count ;
117
107
}
118
108
119
- @ Override
120
- public Object getInputSource () {
121
- return _reader ;
122
- }
109
+ @ Override public Object getInputSource () { return _reader ; }
123
110
124
111
@ Override
125
112
protected boolean loadMore () throws IOException
@@ -144,8 +131,7 @@ protected boolean loadMore() throws IOException
144
131
return false ;
145
132
}
146
133
147
- protected char getNextChar (String eofMsg )
148
- throws IOException , JsonParseException
134
+ protected char getNextChar (String eofMsg ) throws IOException
149
135
{
150
136
if (_inputPtr >= _inputEnd ) {
151
137
if (!loadMore ()) {
@@ -180,8 +166,7 @@ protected void _closeInput() throws IOException
180
166
* separately (if need be).
181
167
*/
182
168
@ Override
183
- protected void _releaseBuffers ()
184
- throws IOException
169
+ protected void _releaseBuffers () throws IOException
185
170
{
186
171
super ._releaseBuffers ();
187
172
// merge new symbols, if any
@@ -206,8 +191,7 @@ protected void _releaseBuffers()
206
191
* Method can be called for any event.
207
192
*/
208
193
@ Override
209
- public String getText ()
210
- throws IOException , JsonParseException
194
+ public String getText () throws IOException
211
195
{
212
196
JsonToken t = _currToken ;
213
197
if (t == JsonToken .VALUE_STRING ) {
@@ -224,7 +208,7 @@ public String getText()
224
208
225
209
// @since 2.1
226
210
@ Override
227
- public String getValueAsString () throws IOException , JsonParseException
211
+ public String getValueAsString () throws IOException
228
212
{
229
213
if (_currToken == JsonToken .VALUE_STRING ) {
230
214
if (_tokenIncomplete ) {
@@ -238,8 +222,7 @@ public String getValueAsString() throws IOException, JsonParseException
238
222
239
223
// @since 2.1
240
224
@ Override
241
- public String getValueAsString (String defValue ) throws IOException , JsonParseException
242
- {
225
+ public String getValueAsString (String defValue ) throws IOException {
243
226
if (_currToken == JsonToken .VALUE_STRING ) {
244
227
if (_tokenIncomplete ) {
245
228
_tokenIncomplete = false ;
@@ -250,8 +233,7 @@ public String getValueAsString(String defValue) throws IOException, JsonParseExc
250
233
return super .getValueAsString (defValue );
251
234
}
252
235
253
- protected String _getText2 (JsonToken t )
254
- {
236
+ protected String _getText2 (JsonToken t ) {
255
237
if (t == null ) {
256
238
return null ;
257
239
}
@@ -270,8 +252,7 @@ protected String _getText2(JsonToken t)
270
252
}
271
253
272
254
@ Override
273
- public char [] getTextCharacters ()
274
- throws IOException , JsonParseException
255
+ public char [] getTextCharacters () throws IOException
275
256
{
276
257
if (_currToken != null ) { // null only before/after document
277
258
switch (_currToken .id ()) {
@@ -307,8 +288,7 @@ public char[] getTextCharacters()
307
288
}
308
289
309
290
@ Override
310
- public int getTextLength ()
311
- throws IOException , JsonParseException
291
+ public int getTextLength () throws IOException
312
292
{
313
293
if (_currToken != null ) { // null only before/after document
314
294
switch (_currToken .id ()) {
@@ -333,7 +313,7 @@ public int getTextLength()
333
313
}
334
314
335
315
@ Override
336
- public int getTextOffset () throws IOException , JsonParseException
316
+ public int getTextOffset () throws IOException
337
317
{
338
318
// Most have offset of 0, only some may have other values:
339
319
if (_currToken != null ) {
@@ -356,8 +336,7 @@ public int getTextOffset() throws IOException, JsonParseException
356
336
}
357
337
358
338
@ Override
359
- public byte [] getBinaryValue (Base64Variant b64variant )
360
- throws IOException , JsonParseException
339
+ public byte [] getBinaryValue (Base64Variant b64variant ) throws IOException
361
340
{
362
341
if (_currToken != JsonToken .VALUE_STRING &&
363
342
(_currToken != JsonToken .VALUE_EMBEDDED_OBJECT || _binaryValue == null )) {
@@ -388,8 +367,7 @@ public byte[] getBinaryValue(Base64Variant b64variant)
388
367
}
389
368
390
369
@ Override
391
- public int readBinaryValue (Base64Variant b64variant , OutputStream out )
392
- throws IOException , JsonParseException
370
+ public int readBinaryValue (Base64Variant b64variant , OutputStream out ) throws IOException
393
371
{
394
372
// if we have already read the token, just use whatever we may have
395
373
if (!_tokenIncomplete || _currToken != JsonToken .VALUE_STRING ) {
@@ -406,8 +384,7 @@ public int readBinaryValue(Base64Variant b64variant, OutputStream out)
406
384
}
407
385
}
408
386
409
- protected int _readBinary (Base64Variant b64variant , OutputStream out , byte [] buffer )
410
- throws IOException , JsonParseException
387
+ protected int _readBinary (Base64Variant b64variant , OutputStream out , byte [] buffer ) throws IOException
411
388
{
412
389
int outputPtr = 0 ;
413
390
final int outputEnd = buffer .length - 3 ;
@@ -544,8 +521,7 @@ protected int _readBinary(Base64Variant b64variant, OutputStream out, byte[] buf
544
521
* to indicate end-of-input
545
522
*/
546
523
@ Override
547
- public JsonToken nextToken ()
548
- throws IOException , JsonParseException
524
+ public JsonToken nextToken () throws IOException
549
525
{
550
526
_numTypesValid = NR_UNKNOWN ;
551
527
@@ -705,13 +681,12 @@ private JsonToken _nextAfterName()
705
681
/*
706
682
@Override
707
683
public boolean nextFieldName(SerializableString str)
708
- throws IOException, JsonParseException
684
+ throws IOException
709
685
*/
710
686
711
687
// note: identical to one in UTF8StreamJsonParser
712
688
@ Override
713
- public String nextTextValue ()
714
- throws IOException , JsonParseException
689
+ public String nextTextValue () throws IOException
715
690
{
716
691
if (_currToken == JsonToken .FIELD_NAME ) { // mostly copied from '_nextAfterName'
717
692
_nameCopied = false ;
@@ -738,8 +713,7 @@ public String nextTextValue()
738
713
739
714
// note: identical to one in Utf8StreamParser
740
715
@ Override
741
- public int nextIntValue (int defaultValue )
742
- throws IOException , JsonParseException
716
+ public int nextIntValue (int defaultValue ) throws IOException
743
717
{
744
718
if (_currToken == JsonToken .FIELD_NAME ) {
745
719
_nameCopied = false ;
@@ -762,8 +736,7 @@ public int nextIntValue(int defaultValue)
762
736
763
737
// note: identical to one in Utf8StreamParser
764
738
@ Override
765
- public long nextLongValue (long defaultValue )
766
- throws IOException , JsonParseException
739
+ public long nextLongValue (long defaultValue ) throws IOException
767
740
{
768
741
if (_currToken == JsonToken .FIELD_NAME ) { // mostly copied from '_nextAfterName'
769
742
_nameCopied = false ;
@@ -786,8 +759,7 @@ public long nextLongValue(long defaultValue)
786
759
787
760
// note: identical to one in UTF8StreamJsonParser
788
761
@ Override
789
- public Boolean nextBooleanValue ()
790
- throws IOException , JsonParseException
762
+ public Boolean nextBooleanValue () throws IOException
791
763
{
792
764
if (_currToken == JsonToken .FIELD_NAME ) { // mostly copied from '_nextAfterName'
793
765
_nameCopied = false ;
@@ -2018,8 +1990,7 @@ protected void _reportInvalidToken(String matchedPart) throws IOException {
2018
1990
_reportInvalidToken (matchedPart , "'null', 'true', 'false' or NaN" );
2019
1991
}
2020
1992
2021
- protected void _reportInvalidToken (String matchedPart , String msg )
2022
- throws IOException
1993
+ protected void _reportInvalidToken (String matchedPart , String msg ) throws IOException
2023
1994
{
2024
1995
StringBuilder sb = new StringBuilder (matchedPart );
2025
1996
/* Let's just try to find what appears to be the token, using
0 commit comments