com.infoteria.asteria.flowlibrary2.stream
Class StreamFactoryXML

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

public class StreamFactoryXML
extends StreamFactoryText

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


Method Summary
 StreamDataObject create()
          空のストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。
※空のXMLはXMLとしてValidではないのでこのメソッドは常にExceptionになります。
 StreamDataObject create(byte[] b)
           
 StreamDataObject create(byte[] b, String enc)
           
 StreamDataXML create(Document doc)
          Documentからストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。
 StreamDataObject create(File file)
           
 StreamDataObject create(InputStream is)
           
 StreamDataObject create(String str)
           
 StreamDataObject createEmptyStream()
          要素名が"root"という名前の、root要素のみが存在するXMLを作成して返します。
protected  boolean doEquals(StreamFactory sf)
           
 String getDoctypeSystemId()
          SystemIdプロパティの値を取得します。
 int getOutputForm()
          OutputFormプロパティの値を返します。(StreamDataXML#FORM_XXXX)
 boolean isNormalize()
          Normalizeプロパティの値を取得します。
 boolean isOutputXMLDeclaration()
          OutputXMLDeclarationプロパティの値を取得します。
 boolean isUseEmptyTag()
          EmptyTagプロパティの値を取得します。
 boolean isValidating()
          Validateプロパティの値を取得します。
 
Methods inherited from class com.infoteria.asteria.flowlibrary2.stream.StreamFactoryText
getEncoding, getLineFeed, setLineFeed
 
Methods inherited from class com.infoteria.asteria.flowlibrary2.stream.StreamFactory
addProperty, compare, equals, getFieldDefinition, getInstance, getType, setFieldDefinition, setNeedCheckpointParse, setProperties
 
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,
                               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 StreamFactoryText

create

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

create

public StreamDataXML create(Document doc)
                     throws StreamException
Documentからストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。

create

public StreamDataObject create(File file)
                        throws StreamException
Description copied from class: StreamFactory
Fileオブジェクトからストリームを作成します。
実際にはファイルの内容を取得して、create(byte[])メソッドが呼び出されます。
Overrides:
create in class StreamFactory

create

public StreamDataObject create(InputStream is)
                        throws StreamException
Description copied from class: StreamFactory
java.io.InputStreamからストリームを作成します。
実際にはInputStreamの内容を取得して、create(byte[])メソッドが呼び出されます。
Overrides:
create in class StreamFactory

isNormalize

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

isValidating

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

isOutputXMLDeclaration

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

getDoctypeSystemId

public String getDoctypeSystemId()
SystemIdプロパティの値を取得します。

getOutputForm

public int getOutputForm()
OutputFormプロパティの値を返します。(StreamDataXML#FORM_XXXX)

isUseEmptyTag

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

createEmptyStream

public StreamDataObject createEmptyStream()
                                   throws StreamException
要素名が"root"という名前の、root要素のみが存在するXMLを作成して返します。
Overrides:
createEmptyStream in class StreamFactoryText

doEquals

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