Class StreamFactory
java.lang.Object
com.infoteria.asteria.flowlibrary2.stream.StreamFactory
- Direct Known Subclasses:
StreamFactoryBinary,StreamFactoryParameterList,StreamFactoryRecord,StreamFactoryText
ストリームファクトリ。
ストリームファクトリはコンポーネントで設定されたフィールド定義とストリームプロパティを保持し、 ストリームに対して適用します。
ストリームファクトリはコンポーネントで設定されたフィールド定義とストリームプロパティを保持し、 ストリームに対して適用します。
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedStreamFactory(com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy strategy) protectedStreamFactory(StreamFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) ストリーム定義のプロパティを設定しますprotected static booleancreate()Create a StreamDataObject instance.abstract StreamDataObjectcreate(byte[] b) バイト列を基にストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。Fileオブジェクトからストリームを作成します。create(InputStream is) java.io.InputStreamからストリームを作成します。空のストリームを作成します。protected booleanbooleanGet OutputStream to write stream data to.フィールド定義を取得します。static StreamFactorygetInstance(int type) StreamTypeに応じたStreamFactoryのインスタンスを生成しますstatic StreamFactorygetInstance(int type, com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy streamFactoryStrategy) StreamTypeに応じたStreamFactoryのインスタンスを生成しますintgetType()このファクトリのストリームフォーマットを返します。
返り値はStreamTypeクラスで宣言されているシンボルのいずれかになります。voidInitialize instance and discard previously added data.voidフィールド定義を設定します。voidsetNeedCheckpointParse(boolean b) voidsetProperties(StreamDataObject stream) 引数のstreamに対してストリームプロパティを適用します。
引数のstreamに既にストリームプロパティが設定されている場合は何もしません。voidClose any resources and discard previously added data.
-
Constructor Details
-
StreamFactory
protected StreamFactory() -
StreamFactory
protected StreamFactory(com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy strategy) -
StreamFactory
-
-
Method Details
-
getInstance
StreamTypeに応じたStreamFactoryのインスタンスを生成します -
getInstance
public static StreamFactory getInstance(int type, com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy streamFactoryStrategy) StreamTypeに応じたStreamFactoryのインスタンスを生成します -
addProperty
ストリーム定義のプロパティを設定します- Throws:
CompileException
-
setProperties
引数のstreamに対してストリームプロパティを適用します。
引数のstreamに既にストリームプロパティが設定されている場合は何もしません。- Throws:
StreamException
-
setFieldDefinition
フィールド定義を設定します。 -
getFieldDefinition
フィールド定義を取得します。 -
getType
public int getType()このファクトリのストリームフォーマットを返します。
返り値はStreamTypeクラスで宣言されているシンボルのいずれかになります。 -
initialize
public void initialize()Initialize instance and discard previously added data. Used together with "add" methods,create()andterminate(). Example usage:try { initialize(); add(dataPart1); add(dataPart2); stream = create(); } finally { terminate(); } -
getFactoryOutputStream
Get OutputStream to write stream data to. Callprior to this method. When finished writing all data to the output stream, callinvalid reference
#initialize(StreamProperties)to create the stream object. Data can only be provided either withinvalid reference
#create(StreamProperties)or "add" methods, but not both.invalid reference
#getFactoryOutputStream(StreamProperties)- Parameters:
streamProperties- properties to use for the new stream- Returns:
- the output stream to write stream data to
- Throws:
StreamException
-
terminate
public void terminate()Close any resources and discard previously added data. Seeinitialize()for more details. -
create
バイト列を基にストリームを作成します。
返り値のストリームにはストリームプロパティが適用されています。- Throws:
StreamException
-
create
Create a StreamDataObject instance. If data is available from previous calls of "add" methods, the instance will be created using these data. Otherwise, an empty StreamDataObject instance will be returned. This method automatically callsterminate()in the end. Seeinitialize()for more details.
返り値のストリームにはストリームプロパティが適用されています。- Returns:
- the new stream object
- Throws:
StreamException- in case of an exception
-
createEmptyStream
空のストリームを作成します。- Throws:
StreamException
-
create
Fileオブジェクトからストリームを作成します。- Throws:
StreamException
-
create
java.io.InputStreamからストリームを作成します。- Throws:
StreamException
-
compare
-
equals
-
doEquals
-
setNeedCheckpointParse
public void setNeedCheckpointParse(boolean b)
-