PREV CLASS
NEXT CLASS
com.ibm.portal.resolver.data
Interface JsonDataSource
- All Superinterfaces:
- Addressable, DataSource, DataSourceFragment, Disposable, TimeStamped
-
public interface JsonDataSource
- extends DataSource
Implemented by providers of Json data streams. The data provider streams the
data to the JsonContentHandler.
- Since:
- 7.0.0.1
- Note:
This interface is designed to be implemented by clients. |
Field Summary
|
static java.lang.String |
CONTENT_TYPE_JSON
Mime type for JSON content as defined in RFC 4627 |
static java.lang.String |
CONTENT_TYPE_JSON_UTF8
Mime type for json messages using UTF-8 character encoding |
static java.lang.String |
KEY_CHARSET
Name of the mime key that specifies the characterset |
CONTENT_TYPE_JSON
static final java.lang.String CONTENT_TYPE_JSON
- Mime type for JSON content as defined in RFC 4627
CONTENT_TYPE_JSON_UTF8
static final java.lang.String CONTENT_TYPE_JSON_UTF8
- Mime type for json messages using UTF-8 character encoding
KEY_CHARSET
static final java.lang.String KEY_CHARSET
- Name of the mime key that specifies the characterset
- See Also:
- Constant Field Values
getContentType
java.lang.String getContentType()
- Mime type of the data. The return value must be a valid json mime-type,
e.g. "application/json". The mime type may contain a charset parameter to
indicate the character set when serializing to a byte stream, e.g.
"application/json; charset=UTF-8"
- Specified by:
- getContentType in interface DataSource
- Returns:
- mime type string, not null
write
DefaultJsonContentHandler write(DefaultJsonContentHandler out)
throws java.io.IOException
- Copies the complete data onto the target handler.
- Parameters:
- out - target handler to receive the data.
- Returns:
- reference to the target handler to allow for method chaining
- Throws:
- java.io.IOException - - if the copy operation failed
PREV CLASS
NEXT CLASS