public class SimpleTextRenderer extends BaseRenderer
The format of the rendered representation is identical to that used by
java.util.Properties
, except that character set encoding
is handled more cleanly by SimpleTextRenderer.
Modifier and Type | Field and Description |
---|---|
static String |
CHAR_ENCODING
The hashtable key for specifying a character encoding to the
renderAsStream method.
|
protected S_LibrarySession |
m_Session
The S_LibrarySession that constructed this SimpleTextRenderer.
|
static String |
SUPPRESS_IDS
The hashtable key for specifying that ids are to be suppressed
from the InputStream or Reader returned by renderAsStream or
renderAsReader, replaced by the String "suppressed".
|
Constructor and Description |
---|
SimpleTextRenderer(S_LibrarySession session)
Constructs a SimpleTextRenderer.
|
Modifier and Type | Method and Description |
---|---|
Reader |
renderAsReader(S_LibraryObject lo,
Hashtable options)
Renders the specified LibraryObject as a Reader.
|
InputStream |
renderAsStream(S_LibraryObject lo,
Hashtable options)
Renders the specified LibraryObject as an InputStream.
|
public static final String CHAR_ENCODING
public static final String SUPPRESS_IDS
protected S_LibrarySession m_Session
public SimpleTextRenderer(S_LibrarySession session) throws IfsException
session
- the S_LibrarySession constructing this
SimpleTextRendererIfsException
- (IFS-12400) if the operation failspublic InputStream renderAsStream(S_LibraryObject lo, Hashtable options) throws IfsException
The options
parameter, if non-null, further controls the
behavior of the Renderer through a set of option name/value pairs.
The options are:
CHAR_ENCODING
: a String specifying the desired
character encoding; defaults to
the Localizer's character encodingSUPPRESS_IDS
: a Boolean specifying whether id
values should be suppressed in the
rendered representation, replaced by
the String "suppressed"; defaults to
falselo
- the object to be renderedoptions
- see method descriptionIfsException
- (IFS-12401) if the operation failspublic Reader renderAsReader(S_LibraryObject lo, Hashtable options) throws IfsException
The options
parameter, if non-null, further controls the
behavior of the Renderer through a set of option name/value pairs.
The options are:
SUPPRESS_IDS
: a Boolean specifying whether id
values should be suppressed in the
rendered representation, replaced by
the String "suppressed"; defaults to
falselo
- the object to be renderedoptions
- see method descriptionIfsException
- (IFS-12402) if the operation failsCopyright © 2023. All rights reserved.