@@ -1175,8 +1175,148 @@ public JsonGenerator createGenerator(DataOutput out) throws IOException {
1175
1175
/**********************************************************
1176
1176
*/
1177
1177
1178
- // TODO
1179
-
1178
+ /**
1179
+ * Factory method for constructing properly initialized {@link JsonParser}
1180
+ * to read content from specified {@link File}.
1181
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1182
+ * for properly closing it once content reading is complete.
1183
+ *
1184
+ * @since 2.11
1185
+ */
1186
+ public JsonParser createParser (File src ) throws IOException {
1187
+ _assertNotNull ("src" , src );
1188
+ return _jsonFactory .createParser (src );
1189
+ }
1190
+
1191
+ /**
1192
+ * Factory method for constructing properly initialized {@link JsonParser}
1193
+ * to read content from specified {@link File}.
1194
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1195
+ * for properly closing it once content reading is complete.
1196
+ *
1197
+ * @since 2.11
1198
+ */
1199
+ public JsonParser createParser (URL src ) throws IOException {
1200
+ _assertNotNull ("src" , src );
1201
+ return _jsonFactory .createParser (src );
1202
+ }
1203
+
1204
+ /**
1205
+ * Factory method for constructing properly initialized {@link JsonParser}
1206
+ * to read content using specified {@link InputStream}.
1207
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1208
+ * for properly closing it once content reading is complete.
1209
+ *
1210
+ * @since 2.11
1211
+ */
1212
+ public JsonParser createParser (InputStream in ) throws IOException {
1213
+ _assertNotNull ("in" , in );
1214
+ return _jsonFactory .createParser (in );
1215
+ }
1216
+
1217
+ /**
1218
+ * Factory method for constructing properly initialized {@link JsonParser}
1219
+ * to read content using specified {@link Reader}.
1220
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1221
+ * for properly closing it once content reading is complete.
1222
+ *
1223
+ * @since 2.11
1224
+ */
1225
+ public JsonParser createParser (Reader r ) throws IOException {
1226
+ _assertNotNull ("r" , r );
1227
+ return _jsonFactory .createParser (r );
1228
+ }
1229
+
1230
+ /**
1231
+ * Factory method for constructing properly initialized {@link JsonParser}
1232
+ * to read content from specified byte array.
1233
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1234
+ * for properly closing it once content reading is complete.
1235
+ *
1236
+ * @since 2.11
1237
+ */
1238
+ public JsonParser createParser (byte [] content ) throws IOException {
1239
+ _assertNotNull ("content" , content );
1240
+ return _jsonFactory .createParser (content );
1241
+ }
1242
+
1243
+ /**
1244
+ * Factory method for constructing properly initialized {@link JsonParser}
1245
+ * to read content from specified byte array.
1246
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1247
+ * for properly closing it once content reading is complete.
1248
+ *
1249
+ * @since 2.11
1250
+ */
1251
+ public JsonParser createParser (byte [] content , int offset , int len ) throws IOException {
1252
+ _assertNotNull ("content" , content );
1253
+ return _jsonFactory .createParser (content , offset , len );
1254
+ }
1255
+
1256
+ /**
1257
+ * Factory method for constructing properly initialized {@link JsonParser}
1258
+ * to read content from specified String.
1259
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1260
+ * for properly closing it once content reading is complete.
1261
+ *
1262
+ * @since 2.11
1263
+ */
1264
+ public JsonParser createParser (String content ) throws IOException {
1265
+ _assertNotNull ("content" , content );
1266
+ return _jsonFactory .createParser (content );
1267
+ }
1268
+
1269
+ /**
1270
+ * Factory method for constructing properly initialized {@link JsonParser}
1271
+ * to read content from specified character array
1272
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1273
+ * for properly closing it once content reading is complete.
1274
+ *
1275
+ * @since 2.11
1276
+ */
1277
+ public JsonParser createParser (char [] content ) throws IOException {
1278
+ _assertNotNull ("content" , content );
1279
+ return _jsonFactory .createParser (content );
1280
+ }
1281
+
1282
+ /**
1283
+ * Factory method for constructing properly initialized {@link JsonParser}
1284
+ * to read content from specified character array.
1285
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1286
+ * for properly closing it once content reading is complete.
1287
+ *
1288
+ * @since 2.11
1289
+ */
1290
+ public JsonParser createParser (char [] content , int offset , int len ) throws IOException {
1291
+ _assertNotNull ("content" , content );
1292
+ return _jsonFactory .createParser (content , offset , len );
1293
+ }
1294
+
1295
+ /**
1296
+ * Factory method for constructing properly initialized {@link JsonParser}
1297
+ * to read content using specified {@link DataInput}.
1298
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1299
+ * for properly closing it once content reading is complete.
1300
+ *
1301
+ * @since 2.11
1302
+ */
1303
+ public JsonParser createParser (DataInput content ) throws IOException {
1304
+ _assertNotNull ("content" , content );
1305
+ return _jsonFactory .createParser (content );
1306
+ }
1307
+
1308
+ /**
1309
+ * Factory method for constructing properly initialized {@link JsonParser}
1310
+ * to read content using non-blocking (asynchronous) mode.
1311
+ * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
1312
+ * for properly closing it once content reading is complete.
1313
+ *
1314
+ * @since 2.11
1315
+ */
1316
+ public JsonParser createNonBlockingByteArrayParser () throws IOException {
1317
+ return _jsonFactory .createNonBlockingByteArrayParser ();
1318
+ }
1319
+
1180
1320
/*
1181
1321
/**********************************************************
1182
1322
/* Configuration: main config object access
0 commit comments