static JSONArray parseArray(InputStream in, JSONReader.Feature... features) {
        if (in == null) {
            return null;
        }

        final JSONReader.Context context = JSONFactory.createReadContext(features);
        try (JSONReader reader = JSONReader.of(in, StandardCharsets.UTF_8, context)) {
            if (reader.nextIfNull()) {
                return null;
            }
            JSONArray array = new JSONArray();
            reader.read(array);
            if (reader.resolveTasks != null) {
                reader.handleResolveTasks(array);
            }
            if (reader.ch != EOI && (context.features & IgnoreCheckClose.mask) == 0) {
                throw new JSONException(reader.info("input not end"));
            }
            return array;
        }
    }
Parses the json stream as a {@link JSONArray}. Returns {@code null}
if received {@link InputStream} is {@code null} or its content is null.

@param in the specified stream to be parsed
@param features the specified features is applied to parsing
@return {@link JSONArray} or {@code null}
@throws JSONException If an I/O error or parsing error occurs
core/src/main/java/com/alibaba/fastjson2/JSON.java