com.infoteria.asteria.flowlibrary2.stream
Class StreamFactoryJSON

java.lang.Object
  |
  +--com.infoteria.asteria.flowlibrary2.stream.StreamFactory
        |
        +--com.infoteria.asteria.flowlibrary2.stream.StreamFactoryText
              |
              +--com.infoteria.asteria.flowlibrary2.stream.StreamFactoryJSON

public class StreamFactoryJSON
extends StreamFactoryText

XMLのストリームファクトリ。
StreamFactory#getTypeがStreamType.XMLを返す場合このクラスにキャストできます。


Method Summary
 StreamDataObject create()
          空のストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。
※空のXMLはXMLとしてValidではないのでこのメソッドは常にExceptionになります。
 StreamDataObject create(byte[] b)
           
 StreamDataObject create(byte[] b, java.lang.String enc)
           
 StreamDataObject create(java.io.File file)
           
 StreamDataObject create(java.io.InputStream is)
           
 StreamDataJSON create(com.infoteria.asteria.util.json.JSONObject json)
          JSONObjectからストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。
 StreamDataObject create(java.lang.String str)
           
 StreamDataObject createEmptyStream()
          空のJSONオブジェクトを作成して返します。
protected  boolean doEquals(StreamFactory sf)
           
 boolean isIndent()
          Indentプロパティの値を取得します。
 
Methods inherited from class com.infoteria.asteria.flowlibrary2.stream.StreamFactoryText
add, create, create, getEncoding, getLineFeed, setLineFeed
 
Methods inherited from class com.infoteria.asteria.flowlibrary2.stream.StreamFactory
addProperty, compare, equals, getFactoryOutputStream, getFieldDefinition, getInstance, getInstance, getType, initialize, setFieldDefinition, setNeedCheckpointParse, setProperties, terminate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public StreamDataObject create(byte[] b)
                        throws StreamException
Description copied from class: StreamFactory
バイト列を基にストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。
Overrides:
create in class StreamFactoryText

create

public StreamDataObject create(byte[] b,
                               java.lang.String enc)
                        throws StreamException
Description copied from class: StreamFactoryText
バイト列とエンコーディングを指定してストリームを作成します。
encがnullの場合AutoDetectとなります。
返り値のストリームにはストリームプロパティが適用されています。
Overrides:
create in class StreamFactoryText

create

public StreamDataObject create()
                        throws StreamException
空のストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。
※空のXMLはXMLとしてValidではないのでこのメソッドは常にExceptionになります。
Overrides:
create in class StreamFactory
Following copied from class: com.infoteria.asteria.flowlibrary2.stream.StreamFactory
Returns:
the new stream object
Throws:
StreamException - in case of an exception

create

public StreamDataObject create(java.lang.String str)
                        throws StreamException
Description copied from class: StreamFactoryText
文字列からストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。
Overrides:
create in class StreamFactoryText

create

public StreamDataJSON create(com.infoteria.asteria.util.json.JSONObject json)
                      throws StreamException
JSONObjectからストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。

create

public StreamDataObject create(java.io.File file)
                        throws StreamException
Description copied from class: StreamFactory
Fileオブジェクトからストリームを作成します。
Overrides:
create in class StreamFactory

create

public StreamDataObject create(java.io.InputStream is)
                        throws StreamException
Description copied from class: StreamFactory
java.io.InputStreamからストリームを作成します。
Overrides:
create in class StreamFactory

isIndent

public boolean isIndent()
Indentプロパティの値を取得します。

createEmptyStream

public StreamDataObject createEmptyStream()
                                   throws StreamException
空のJSONオブジェクトを作成して返します。
Overrides:
createEmptyStream in class StreamFactory

doEquals

protected boolean doEquals(StreamFactory sf)
Overrides:
doEquals in class StreamFactoryText