Chinaunix首页 | 论坛 | 博客
  • 博客访问: 94645
  • 博文数量: 11
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 191
  • 用 户 组: 普通用户
  • 注册时间: 2013-10-18 16:33
个人简介

有二事焉,恒然于心,敬之畏之,日省日甚!外乎者如璀璨星穹,内在者犹道德律令。

文章分类

全部博文(11)

文章存档

2017年(7)

2014年(2)

2013年(2)

我的朋友

分类: Java

2013-12-30 21:56:26

javax.json.spi

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(Map config)
      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(Map config)
      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(Map config)
      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(Map config)
      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(Map config)
      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 no available
      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 RFC 4627.
      (用给定的字节流创建一个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(Map config)
      Creates a parser factory for creating JsonParser instances. The factory is configured with the specified map of provider specific
      configuration properties. Provider implementations should ignore any unsupported configuration properties 
specified 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(Map config)
      Creates a generator factory for creating JsonGenerator instances. The factory is configured with the specified map of provider
      specific configuration properties. Provider implementations should ignore any unsupported configuration properties 
specified
      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 the stream
      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(Map config)
      Creates a writer factory for creating JsonWriter objects. The factory is configured with the specified map of provider specific
      configuration properties. Provider implementations should ignore any unsupported configuration properties 
specified 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(Map config)
      Creates a reader factory for creating JsonReader objects. The factory is configured with the specified map of provider specific
      configuration properties. Provider implementations should ignore any unsupported configuration properties 
specified 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(Map config)
      Creates a builder factory for creating JsonArrayBuilder and JsonObjectBuilder objects. The factory is configured with the
     
specified map of provider specific configuration properties. Provider implementations should ignore any unsupported configuration
      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建造者工厂)





囿于译者水平有限,文中难免存在不妥之处,敬请谅解!!

阅读(4888) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~