|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.infoteria.asteria.flowlibrary2.stream.StreamFactory
ストリームファクトリ。
ストリームファクトリはコンポーネントで設定されたフィールド定義とストリームプロパティを保持し、
ストリームに対して適用します。
Constructor Summary | |
protected |
StreamFactory()
|
protected |
StreamFactory(com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy strategy)
|
protected |
StreamFactory(StreamFactory factory)
|
Method Summary | |
void |
addProperty(java.lang.String name,
java.lang.String value)
ストリーム定義のプロパティを設定します |
protected static boolean |
compare(java.lang.Object o1,
java.lang.Object o2)
|
StreamDataObject |
create()
Create a StreamDataObject instance. |
abstract StreamDataObject |
create(byte[] b)
バイト列を基にストリームを作成します。 返り値のストリームにはストリームプロパティが適用されています。 |
StreamDataObject |
create(java.io.File file)
Fileオブジェクトからストリームを作成します。 |
StreamDataObject |
create(java.io.InputStream is)
java.io.InputStreamからストリームを作成します。 |
StreamDataObject |
createEmptyStream()
空のストリームを作成します。 |
protected boolean |
doEquals(StreamFactory sf)
|
boolean |
equals(java.lang.Object o)
|
java.io.OutputStream |
getFactoryOutputStream()
Get OutputStream to write stream data to. |
FieldDefinition |
getFieldDefinition()
フィールド定義を取得します。 |
static StreamFactory |
getInstance(int type)
StreamTypeに応じたStreamFactoryのインスタンスを生成します |
static StreamFactory |
getInstance(int type,
com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy streamFactoryStrategy)
StreamTypeに応じたStreamFactoryのインスタンスを生成します |
int |
getType()
このファクトリのストリームフォーマットを返します。 返り値はStreamTypeクラスで宣言されているシンボルのいずれかになります。 |
void |
initialize()
Initialize instance and discard previously added data. |
void |
setFieldDefinition(FieldDefinition value)
フィールド定義を設定します。 |
void |
setNeedCheckpointParse(boolean b)
|
void |
setProperties(StreamDataObject stream)
引数のstreamに対してストリームプロパティを適用します。 引数のstreamに既にストリームプロパティが設定されている場合は何もしません。 |
void |
terminate()
Close any resources and discard previously added data. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected StreamFactory()
protected StreamFactory(com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy strategy)
protected StreamFactory(StreamFactory factory)
Method Detail |
public static StreamFactory getInstance(int type)
public static StreamFactory getInstance(int type, com.infoteria.asteria.flowlibrary2.stream.strategy.IStreamStrategy streamFactoryStrategy)
public void addProperty(java.lang.String name, java.lang.String value) throws CompileException
public void setProperties(StreamDataObject stream) throws StreamException
public void setFieldDefinition(FieldDefinition value)
public FieldDefinition getFieldDefinition()
public int getType()
public void initialize()
create()
and terminate()
. Example usage:
try {
initialize();
add(dataPart1);
add(dataPart2);
stream = create();
} finally {
terminate();
}
public java.io.OutputStream getFactoryOutputStream() throws StreamException
#initialize(StreamProperties)
prior to this method.
When finished writing all data to the output stream, call #create(StreamProperties)
to create the stream object.
Data can only be provided either with #getFactoryOutputStream(StreamProperties)
or "add" methods, but not both.streamProperties
- properties to use for the new streamStreamException
- public void terminate()
initialize()
for more details.public abstract StreamDataObject create(byte[] b) throws StreamException
public StreamDataObject create() throws StreamException
terminate()
in the end. See initialize()
for more details.StreamException
- in case of an exceptionpublic StreamDataObject createEmptyStream() throws StreamException
public StreamDataObject create(java.io.File file) throws StreamException
public StreamDataObject create(java.io.InputStream is) throws StreamException
protected static boolean compare(java.lang.Object o1, java.lang.Object o2)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean doEquals(StreamFactory sf)
public void setNeedCheckpointParse(boolean b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |