Class RawText
- All Implemented Interfaces:
RawContent
String-backed raw-content wrapper that the XML and HTML serializers emit verbatim.
This is the reusable analogue of handing the serializer a one-shot Reader: the value is emitted
without any XML entity escaping or String it can be serialized any number of times. This makes a bean carrying a
RawText value survive a serialize→object→serialize cycle (for the serialize direction), unlike a
consumed Reader.
Typical use is embedding pre-built script/style bodies into a Script/Style element:
Example:
Safety: content is emitted verbatim. Because Juneau parses via a StAX
XMLStreamReader, a value containing a raw
See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RawText
Constructor.- Parameters:
text- The raw, verbatim text content. Can benull (nothing is emitted).
-
-
Method Details
-
toString
Description copied from interface:RawContentReturns the raw, verbatim character content to emit.- Specified by:
toStringin interfaceRawContent- Overrides:
toStringin classObject- Returns:
- The raw content. May be
null (nothing is emitted).
-