com.ibm.portal.resolver.data
Interface CharDataSource

All Superinterfaces:
Addressable, DataSource, DataSourceFragment, Disposable, TimeStamped

public interface CharDataSource
extends DataSource

Implemented by providers of character data streams. The stream provider must be able to copy the content of the character stream onto the output writer that is passed as a parameter.

Since:
6.1.0
Note:
This interface is designed to be implemented by clients.

Field Summary
static java.lang.String CONTENT_TYPE_TEXT
          Mime type for text messages http://www.rfc-editor.org/rfc/rfc2046.txt
static java.lang.String CONTENT_TYPE_TEXT_GENERAL
          Mime type for general text messages http://www.rfc-editor.org/rfc/rfc2046.txt
static java.lang.String CONTENT_TYPE_TEXT_LATIN1
          Mime type for text messages using latin1 character encoding http://www.rfc-editor.org/rfc/rfc2046.txt
static java.lang.String CONTENT_TYPE_TEXT_UTF8
          Mime type for text messages using UTF-8 character encoding http://www.rfc-editor.org/rfc/rfc2046.txt
static java.lang.String KEY_CHARSET
          Name of the mime key that specifies the characterset
 
Fields inherited from interface com.ibm.portal.resolver.data.DataSource
CONTENT_TYPE_UNKNOWN, CREATION_UNKNOWN, EXPIRATION_UNKNOWN, LAST_MODIFICATION_UNKNOWN, MAX_AGE_INFINITE, MAX_AGE_NONE, ROOT_DATE
 
Fields inherited from interface com.ibm.portal.resolver.data.Addressable
EMPTY_PARAMETERS
 
Method Summary
 java.lang.String getContentType()
          Mime type of the data.
 java.io.Writer write(java.io.Writer out)
          Copies the complete character content to the output writer
 
Methods inherited from interface com.ibm.portal.resolver.data.DataSource
getCreated, getExpiration, getLastModified
 
Methods inherited from interface com.ibm.portal.resolver.data.Addressable
getParameters, getURI
 
Methods inherited from interface com.ibm.portal.Disposable
dispose
 

Field Detail

CONTENT_TYPE_TEXT_GENERAL

static final java.lang.String CONTENT_TYPE_TEXT_GENERAL
Mime type for general text messages http://www.rfc-editor.org/rfc/rfc2046.txt

Since:
7.0
See Also:
Constant Field Values

CONTENT_TYPE_TEXT

static final java.lang.String CONTENT_TYPE_TEXT
Mime type for text messages http://www.rfc-editor.org/rfc/rfc2046.txt

Since:
6.1.0.3
See Also:
Constant Field Values

CONTENT_TYPE_TEXT_UTF8

static final java.lang.String CONTENT_TYPE_TEXT_UTF8
Mime type for text messages using UTF-8 character encoding http://www.rfc-editor.org/rfc/rfc2046.txt

Since:
6.1.0.3
See Also:
Constant Field Values

CONTENT_TYPE_TEXT_LATIN1

static final java.lang.String CONTENT_TYPE_TEXT_LATIN1
Mime type for text messages using latin1 character encoding http://www.rfc-editor.org/rfc/rfc2046.txt

Since:
7.0
See Also:
Constant Field Values

KEY_CHARSET

static final java.lang.String KEY_CHARSET
Name of the mime key that specifies the characterset

Since:
6.1.0.3
See Also:
Constant Field Values
Method Detail

getContentType

java.lang.String getContentType()
Mime type of the data. The return value should be "text/plain" inlcuding the characterset as a mime parameter, e.g. "text/plain; charset=UTF-8"

Specified by:
getContentType in interface DataSource
Returns:
mime type string, not null

write

java.io.Writer write(java.io.Writer out)
                     throws java.io.IOException
Copies the complete character content to the output writer

Parameters:
out - target writer to copy the content to
Returns:
reference to the target writer to support method chaining
Throws:
java.io.IOException - - if the data could not be copied