Ignore:
Timestamp:
2017-12-23T02:40:43+01:00 (7 years ago)
Author:
Don-vip
Message:

see #15682 - upgrade to JSR 374 (JSON Processing) API 1.1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/javax/json/JsonReader.java

    r6756 r13231  
    22 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    33 *
    4  * Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved.
     4 * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved.
    55 *
    66 * The contents of this file are subject to the terms of either the GNU
     
    99 * may not use this file except in compliance with the License.  You can
    1010 * obtain a copy of the License at
    11  * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
    12  * or packager/legal/LICENSE.txt.  See the License for the specific
     11 * https://oss.oracle.com/licenses/CDDL+GPL-1.1
     12 * or LICENSE.txt.  See the License for the specific
    1313 * language governing permissions and limitations under the License.
    1414 *
    1515 * When distributing the software, include this License Header Notice in each
    16  * file and include the License file at packager/legal/LICENSE.txt.
     16 * file and include the License file at LICENSE.txt.
    1717 *
    1818 * GPL Classpath Exception:
     
    5151 *
    5252 * <p>
    53  * <a id="JsonReaderExample1"/>
    5453 * The following example demonstrates how to read an empty JSON array from
    5554 * a string:
     
    7574 * </code>
    7675 * </pre>
    77  *
    78  * @author Jitendra Kotamraju
    7976 */
    8077public interface JsonReader extends  /*Auto*/Closeable {
     
    9188     * @throws javax.json.stream.JsonParsingException if a JSON object or array
    9289     *     cannot be created due to incorrect representation
    93      * @throws IllegalStateException if read, readObject, readArray or
    94      *     close method is already called
     90     * @throws IllegalStateException if read, readObject, readArray,
     91     *     readValue or close method is already called
    9592     */
    9693    JsonStructure read();
     
    107104     * @throws javax.json.stream.JsonParsingException if a JSON object cannot
    108105     *     be created due to incorrect representation
    109      * @throws IllegalStateException if read, readObject, readArray or
    110      *     close method is already called
     106     * @throws IllegalStateException if read, readObject, readArray,
     107     *     readValue or close method is already called
    111108     */
    112109    JsonObject readObject();
     
    123120     * @throws javax.json.stream.JsonParsingException if a JSON array cannot
    124121     *     be created due to incorrect representation
    125      * @throws IllegalStateException if read, readObject, readArray or
    126      *     close method is already called
     122     * @throws IllegalStateException if read, readObject, readArray,
     123     *     readValue or close method is already called
    127124     */
    128125    JsonArray readArray();
     126
     127    /**
     128     * Returns a JSON value that is represented in
     129     * the input source. This method needs to be called
     130     * only once for a reader instance.
     131     *
     132     * @return a JSON value
     133     * @throws JsonException if a JSON value
     134     *     be created due to i/o error (IOException would be
     135     *     cause of JsonException)
     136     * @throws javax.json.stream.JsonParsingException if a JSON value
     137     *     cannot be created due to incorrect representation
     138     * @throws IllegalStateException if read, readObject, readArray,
     139     *     readValue or close method is already called
     140     *
     141     * @since 1.1
     142     */
     143    default JsonValue readValue() {
     144        throw new UnsupportedOperationException();
     145    }
    129146
    130147    /**
Note: See TracChangeset for help on using the changeset viewer.