| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

全部 类 命名空间 文件 函数 变量 枚举值 页
Public 成员函数 | Private 属性 | 所有成员列表
com.google.gson.JsonStreamParser类 参考
类 com.google.gson.JsonStreamParser 继承关系图:

## Public 成员函数
| JsonStreamParser (String json)
| JsonStreamParser (Reader reader)
JsonElement | next () throws JsonParseException
boolean | hasNext ()
void | remove ()

## Private 属性
final JsonReader | parser
final Object | lock

## 详细描述

A streaming parser that allows reading of multiple JsonElements from the specified reader asynchronously.

This class is conditionally thread-safe (see Item 70, Effective Java second edition). To properly use this class across multiple threads, you will need to add some external synchronization. For example:

    JsonStreamParser parser = new JsonStreamParser("['first'] {'second':10} 'third'");
    JsonElement element;
    synchronized (parser) {  // synchronize on an object shared by threads
      if (parser.hasNext()) {
        element = parser.next();
      }
    }

作者
  Inderjeet Singh
  Joel Leitch

自从
  1.4

## 构造及析构函数说明

com.google.gson.JsonStreamParser.JsonStreamParser | ( | String | json | ) |
| inline

参数

  json | The string containing JSON elements concatenated to each other.

自从
  1.4

com.google.gson.JsonStreamParser.JsonStreamParser | ( | Reader | reader | ) |
| inline

参数

  reader | The data stream containing JSON elements concatenated to each other.

自从
  1.4

## 成员函数说明

boolean com.google.gson.JsonStreamParser.hasNext | ( |  | ) |
| inline

Returns true if a JsonElement is available on the input for consumption

返回
  true if a JsonElement is available on the input, false otherwise

自从
  1.4

JsonElement com.google.gson.JsonStreamParser.next | ( |  | ) | throws JsonParseException
| inline

Returns the next available JsonElement on the reader. Null if none available.

返回
  the next available JsonElement on the reader. Null if none available.

异常

  JsonParseException | if the incoming stream is malformed JSON.

自从
  1.4

void com.google.gson.JsonStreamParser.remove | ( |  | ) |
| inline

This optional Iterator method is not relevant for stream parsing and hence is not implemented.

自从
  1.4

## 类成员变量说明

final Object com.google.gson.JsonStreamParser.lock
| private

final JsonReader com.google.gson.JsonStreamParser.parser
| private

该类的文档由以下文件生成:

- src/com/google/gson/JsonStreamParser.java