java 翻译json_java标准json解析套件json-p文档翻译 —— JsonProvider

Class JsonProvider

java.lang.Object

\_javax.json.spi.JsonProvider

--------------------------------------------------------------------------------------------------------------------------------------

public abstract class JsonProvider extends Object

Service provider for JSON processing objects.(JSON处理对象服务提供者)

All the methods in this class are safe for use by multiple concurrent threads.(本类中所有的方法都是线程安全的)

Author:

Jitendra Kotamraju

See Also:

ServiceLoader

Constructor Summary:

protected    JsonProvider()

Method Summary:

* abstract JsonArrayBuilder createArrayBuilder()

Creates a JSON array builder(创建一个JSON数组建造者)

* abstract JsonBuilderFactory createBuilderFactory(Mapconfig)

Creates a builder factory for creating JsonArrayBuilder and JsonObjectBuilder objects.(创建一个建造者工厂用于创建JsonArrayBuilder和

JsonObjectBuilder对象)

* abstract JsonGenerator createGenerator(OutputStream out)

Creates a JSON generator for writing JSON text to a byte stream.(创建一个JSON生产者用于将JSON文本写入字节流)

* abstract JsonGenerator createGenerator(Writer writer)

Creates a JSON generator for writing JSON text to a character stream.(创建一个JSON生产者用于将JSON文本写入字符流)

* abstract JsonGeneratorFactory  createGeneratorFactory(Mapconfig)

Creates a generator factory for creating JsonGenerator instances.(创建一个生产工厂用于创建JsonGenerator实例)

* abstract JsonObjectBuilder createObjectBuilder()

Creates a JSON object builder(创建一个JSON对象建造者)

* abstract JsonParser createParser(InputStream in)

Creates a JSON parser from the specified byte stream.(用给定的字节流创建一个JSON解析器)

* abstract JsonParser createParser(Reader reader)

Creates a JSON parser from a character stream.(用给定的字符流创建一个JSON解析器)

* abstract JsonParserFactory createParserFactory(Mapconfig)

Creates a parser factory for creating JsonParser instances.(创建一个解析器工厂用于创建JsonParser实例)

* abstract JsonReader createReader(InputStream in)

Creates a JSON reader from a byte stream.(用字节流创建一个JSON读取器)

* abstract JsonReader createReader(Reader reader)

Creates a JSON reader from a character stream.(用字符流创建一个JSON读取器)

* abstract JsonReaderFactory createReaderFactory(Mapconfig)

Creates a reader factory for creating JsonReader objects.(创建一个读取器工厂用于创建JsonReader对象)

* abstract JsonWriter createWriter(OutputStream out)

Creates a JSON writer to write a JSON object or array structure to the specified byte stream.(创建一个JSON写入器将结构化的JSON对象或

数组写入到指定的字节流里)

* abstract JsonWriter createWriter(Writer writer)

Creates a JSON writer to write a JSON object or array structure to the specified character stream.(创建一个JSON写入器将结构化的JSON

对象或数组写入到指定的字符流里)

* abstract JsonWriterFactory createWriterFactory(Mapconfig)

Creates a writer factory for creating JsonWriter objects.(创建一个写入器工厂用于创建JsonWriter对象)

* static JsonProvider provider()

+--------------------------------------------------------------------------------------------+

| Methods inherited from class java.lang.Object                                              |

+--------------------------------------------------------------------------------------------+

| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |

+--------------------------------------------------------------------------------------------+

Constructor Detail:

protected JsonProvider()

Method Detail:

* public static JsonProvider provider()

Creates a JSON provider object. The provider is loaded using the ServiceLoader.load(Class) method. If there are noavailable

service providers, this method returns the default service provider.(创建一个JSON提供者对象。这个提供者是通过ServiceLoader.load(Class)

方法加载的。如果没有可用的服务提供者,那么这个方法就会返回默认的服务提供者)

Returns:

a JSON provider(一个提供者)

See Also:

ServiceLoader

* public abstract JsonParser createParser(Reader reader)

Creates a JSON parser from a character stream.(用给定的字符流创建一个JSON解析器)

Parameters:

reader - i/o reader from which JSON is to be read(将要从其中读取JSON的i/o字符流)

Returns:

a JSON parser(一个JSON解析器)

* public abstract JsonParser createParser(InputStream in)

Creates a JSON parser from the specified byte stream. The character encoding of the stream is determined as defined in RFC4627.

(用给定的字节流创建一个JSON解析器,字节流编码由RFC 4627决定)

Parameters:

reader - i/o reader from which JSON is to be read(将要从其中读取JSON的i/o字节流)

Returns:

a JSON parser(一个JSON解析器)

Throws:

JsonException - if encoding cannot be determined or i/o error (IOException would be cause of JsonException)(如果编码不能确定或

者i/o错误(IOException可能会引起JsonException))

* public abstract JsonParserFactory createParserFactory(Mapconfig)

Creates a parser factory for creating JsonParser instances. The factory is configured with the specified map of providerspecific

configuration properties. Provider implementations should ignore any unsupported configuration propertiesspecified in the map.(创

建一个解析器工厂用于创建JsonParser实例。该工厂被provider中map指定的配置项配置。provider的实现应当忽略任何一个在map中的不支持的配置项)

Parameters:

config - a map of provider specific properties to configure the JSON parsers. The map may be empty or null(用于配置JSON解析器的

provider指定的配置项组成的map,该map可能是空或null)

Returns:

a JSON parser factory(一个JSON解析器工厂)

* public abstract JsonGenerator createGenerator(Writer writer)

Creates a JSON generator for writing JSON text to a character stream.(创建将JSON文本写入字符流的JSON生成器)

Parameters:

writer - a i/o writer to which JSON is written(那个将要被写入JSON的字符流)

Returns:

a JSON generator(一个JSON生成器)

* public abstract JsonGenerator createGenerator(OutputStream out)

Creates a JSON generator for writing JSON text to a byte stream.(创建将JSON文本写入字节流的JSON生成器)

Parameters:

out - i/o stream to which JSON is written(那个将要被写入JSON的字节流)

Returns:

a JSON generator(一个JSON生成器)

* public abstract JsonGeneratorFactory createGeneratorFactory(Mapconfig)

Creates a generator factory for creating JsonGenerator instances. The factory is configured with the specified map ofprovider

specific configuration properties. Provider implementations should ignore any unsupported configuration propertiesspecified

in the map.(创建一个能够创建JsonGenerator实例的生成器工厂,该工厂被包含provider指定的配置项的特定map所配置。provider的实现应当忽略map中的任

何一个不支持的配置项)

Parameters:

config - a map of provider specific properties to configure the JSON generators. The map may be empty or null(一个包含provider

指定的配置项的用于配置JSON生成器的map,该map可能是空或null)

Returns:

a JSON generator factory(一个JSON生成器工厂)

* public abstract JsonReader createReader(Reader reader)

Creates a JSON reader from a character stream.(从一个字符流创建一个JSON读取器)

Parameters:

reader - a reader from which JSON is to be read(那个将要从其中读取JSON的字符流)

Returns:

a JSON reader(一个JSON读取器)

* public abstract JsonReader createReader(InputStream in)

Creates a JSON reader from a byte stream. The character encoding of the stream is determined as described in RFC 4627(从一个字节流

创建一个JSON读取器。这个字节流的字符编码由RFC 4627规范来决定)

Parameters:

in - a byte stream from which JSON is to be read(那个将要从其中读取JSON的字节流)

Returns:

a JSON reader(一个JSON读取器)

* public abstract JsonWriter createWriter(Writer writer)

Creates a JSON writer to write a JSON object or array structure to the specified character stream.(创建一个JSON写入器将JSON对象或数

组等结构化的东西写入到指定的字符流里)

Parameters:

writer - to which JSON object or array is written(那个将被写入JSON对象或数组的字符流)

Returns:

a JSON writer(一个JSON写入器)

* public abstract JsonWriter createWriter(OutputStream out)

Creates a JSON writer to write a JSON object or array structure to the specified byte stream. Characters written to thestream

are encoded into bytes using UTF-8 encoding.(创建一个JSON写入器将JSON对象或数组等结构化的东西写入到指定的字节流里,写入到流里的字符被UTF-8

编码规则转为字节)

Parameters:

out - to which JSON object or array is written(那个将被写入JSON对象或数组的字节流)

Returns:

a JSON writer(一个JSON写入器)

* public abstract JsonWriterFactory createWriterFactory(Mapconfig)

Creates a writer factory for creating JsonWriter objects. The factory is configured with the specified map of providerspecific

configuration properties. Provider implementations should ignore any unsupported configuration propertiesspecified in the map.

(创建一个能够创建JsonWriter对象的写入器工厂,该工厂被包含provider指定的配置项的特定map所配置。provider的实现应当忽略map中的任何一个不支持的配置

项)

Parameters:

config - a map of provider specific properties to configure the JSON writers. The map may be empty or null(一个包含provider指

定的配置项的用于配置JSON写入器的map,该map可能是空或null)

Returns:

a JSON writer factory(一个JSON写入器工厂)

* public abstract JsonReaderFactory createReaderFactory(Mapconfig)

Creates a reader factory for creating JsonReader objects. The factory is configured with the specified map of providerspecific

configuration properties. Provider implementations should ignore any unsupported configuration propertiesspecified in the map.

(创建一个能够创建JsonReader对象的读取器工厂,该工厂被包含provider指定的配置项的特定map所配置。provider的实现应当忽略map中的任何一个不支持的配置

项)

Parameters:

config - a map of provider specific properties to configure the JSON readers. The map may be empty or null(一个包含provider指

定的配置项的用于配置JSON读取器的map,该map可能是空或null)

Returns:

a JSON reader factory(一个JSON读取器工厂)

* public abstract JsonObjectBuilder createObjectBuilder()

Creates a JSON object builder(创建一个JSON对象建造者)

Returns:

a JSON object builder(一个JSON对象建造者)

* public abstract JsonArrayBuilder createArrayBuilder()

Creates a JSON array builder(创建一个JSON数组建造者)

Returns:

a JSON array builder(一个JSON数组建造者)

* public abstract JsonBuilderFactory createBuilderFactory(Mapconfig)

Creates a builder factory for creating JsonArrayBuilder and JsonObjectBuilder objects. The factory is configured with thespecified map of provider specific configuration properties. Provider implementations should ignore any unsupportedconfiguration

properties specified in the map.(创建一个能够创建JsonArrayBuilder和JsonObjectBuilder对象的建造者工厂,该工厂被包含provider指定的配置项的特

定map所配置。provider的实现应当忽略map中的任何一个不支持的配置项)

Parameters:

config - a map of provider specific properties to configure the JSON builders. The map may be empty or null(一个包含provider指

定的配置项的用于配置JSON建造者的map,该map可能是空或null)

Returns:

a JSON builder factory(一个JSON建造者工厂)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值