public interface TextDoc
A TextDoc has a ContentType
,
and a content body which is a sequence of chars.
Abstract Methods | |
---|---|
ContentType |
getContentType()
Get the content type of this document, for example "text/html;charset=UTF-8".
|
Charset |
getCharset()
Get the charset of this document, for example "UTF-8".
|
void |
getContentBody(Consumer<CharSequence> out)
Print the content body to `out`.
|
Default Method | |
CharSequence |
getContentBody()
Get the content body.
|
ContentType getContentType()
The content type should contain a "charset" parameter that is consistent with
getCharset()
.
Charset getCharset()
The charset should be consistent with getContentType()
.
void getContentBody(Consumer<CharSequence> out)
The implementation of this method may invoke `out.accept()` multiple times.
default CharSequence getContentBody()
This default implementation invokes getContentBody(out)
and merges outputs to one char sequence.