|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.softwareag.tamino.db.api.io.TInputStream
public class TInputStream
TInputStream represents a Tamino specific InputStream. This stream class extends FilterInputStream.
It decorates a given InputStream and contains a TStreamHeader. A TStreamHeader can contain
further information about the stream content, such as collection and schema information.
In some rare cases it is neccessary to carry a exception with instead of an non-existing
input stream. This cheating allows to postpone throwing of an exception while still processing
the TSreamHeader!
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
TInputStream(java.lang.Exception failureException,
TStreamHeader header)
Special Constructor. |
|
TInputStream(java.io.InputStream inputStream,
TStreamHeader header)
Special Constructor. |
Method Summary | |
---|---|
void |
addCloseListener(TInputStreamCloseListener closeListener)
Adds a close listener to this input stream. |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
TException |
createTException()
Constructs a TException with the returnvalue, code, messageline and messagetext from this TInputStream. |
protected void |
finalize()
Try to close the inputStream. |
TCommandStatement |
getCommandStatement()
Get the command statement which created this input stream. |
java.lang.String |
getCursorHandle()
Returns the cursor handle from the TInputStream returned by openCursor() method of accessor, returns null otherwise |
java.lang.Exception |
getFailureException()
Gets the failure exception as a Exception instance. |
java.lang.String |
getFirstObjectId()
Get the Tamino object id. |
TStreamHeader |
getHeader()
Gets the streams meta data as a TStreamHeader instance. |
java.lang.String |
getPreparedHandle()
Returns the prepared query's handle from the TInputStream returned by _prepare, returns null otherwise. |
java.lang.String |
getReturnValue()
Get the Tamino return value. |
boolean |
hasCommandStatement()
Check whether this input stream contains a command statement. |
boolean |
hasFailureException()
Checks whether this TInputStream instance contains an failure exception instance. |
boolean |
hasFirstObjectId()
Checks whether this TInputStream instance contains an Tamino object id. |
boolean |
hasObjectContent()
Checks whether this TInputStreams header instance contains an Tamino object content information, i.e. |
boolean |
hasReturnValue()
Checks whether this TInputStream instance contains an Tamino return value. |
boolean |
isGiven()
Checks whether this TInputStream instance contains an InputStream instance. |
void |
setCommandStatement(TCommandStatement commandStatement)
Give this stream the commend statement. |
Methods inherited from class java.io.FilterInputStream |
---|
available, mark, markSupported, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TInputStream(java.io.InputStream inputStream, TStreamHeader header)
inputStream
- the InputStream instance decorated by this TInputStream instance.header
- the TStreamHeader instance to contain meta information.public TInputStream(java.lang.Exception failureException, TStreamHeader header)
failureException
- the exception instance that caused a problem.header
- the TStreamHeader instance to contain meta information.Method Detail |
---|
public TStreamHeader getHeader()
public java.lang.Exception getFailureException()
public boolean isGiven()
public boolean hasReturnValue()
public java.lang.String getReturnValue()
public boolean hasFirstObjectId()
public java.lang.String getFirstObjectId()
public boolean hasObjectContent()
public TCommandStatement getCommandStatement()
public void setCommandStatement(TCommandStatement commandStatement)
commandStatement
- the command statement for this input streampublic boolean hasCommandStatement()
public boolean hasFailureException()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.FilterInputStream
java.io.IOException
- rethrows the original IOException.public void addCloseListener(TInputStreamCloseListener closeListener)
Note: This can only be set once!
closeListener
- the close listener.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String getCursorHandle() throws TException
TException
public java.lang.String getPreparedHandle() throws TException
TException
public TException createTException()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |