com.softwareag.tamino.db.api.io
Interface TStreamable

All Known Subinterfaces:
TXMLStreamable
All Known Implementing Classes:
TDataObject, TDOMAdapter, TNonXMLObject, TSAXAdapter, TStreamAdapter, TXMLObject

public interface TStreamable

TStreamable defines operations for the reading from and writing to streams.

Version:
$Revision: 1.8 $
Author:
Marcus Schreyer

Method Summary
 java.lang.String getContentType()
          Gets the content type of the streamable content if one is given.
 void readFrom(java.io.InputStream inputStream)
          Reads data from the given inputStream.
 void readFrom(java.io.Reader reader)
          Reads data from the given reader.
 void writeTo(java.io.OutputStream outputStream)
          Writes data to the given outputStream.
 void writeTo(java.io.Writer writer)
          Writes data to the given writer.
 

Method Detail

readFrom

void readFrom(java.io.InputStream inputStream)
              throws TStreamReadException
Reads data from the given inputStream.

Parameters:
inputStream - a byte input stream.
Throws:
TStreamReadException - signals an error while attempting to read the stream.

readFrom

void readFrom(java.io.Reader reader)
              throws TStreamReadException
Reads data from the given reader.

Parameters:
reader - a character input stream .
Throws:
TStreamReadException - signals an error while attempting to read the stream.

writeTo

void writeTo(java.io.OutputStream outputStream)
             throws TStreamWriteException
Writes data to the given outputStream.

Parameters:
outputStream - the byte output stream.
Throws:
TStreamWriteException - signals an error while attempting to write the stream.

writeTo

void writeTo(java.io.Writer writer)
             throws TStreamWriteException
Writes data to the given writer.

Parameters:
outputStream - the character output stream.
Throws:
TStreamWriteException - signals an error while attempting to write the stream.

getContentType

java.lang.String getContentType()
Gets the content type of the streamable content if one is given. If none is availabe the empty string is returned.

Returns:
the content type of the streamable content if given, otherwise the empty string.


Copyright (c) 2013 Software AG. All Rights Reserved.