- All Known Subinterfaces:
JavaScript
,Json
,LdJson
,Mysql
,Psql
,Sh
,Style
,Text
,Url
,Xhtml
,XhtmlAttribute
- All Known Implementing Classes:
JavaScriptWriter
,JsonWriter
,LdJsonWriter
,MediaWriter
,MysqlWriter
,PsqlWriter
,ShWriter
,StyleWriter
,TextWriter
,UrlWriter
,WhitespaceWriter
,XhtmlAttributeWriter
,XhtmlWriter
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionEncodes the given nested type with proper encoding.default Encode
Encodes the given nested type with proper encoding.default Encode
Encodes the given nested type with proper encoding.default Encode
Encodes the given nested type with proper encoding.encode
(MediaType contentType, MediaWritable<Ex> content) Encodes the given nested type with proper encoding.encode
(MediaType contentType, IOSupplierE<?, Ex> content) Encodes the given nested type with proper encoding.encode
(MediaType contentType, CharSequence csq) Encodes the given nested type with proper encoding.encode
(MediaType contentType, CharSequence csq, int start, int end) Encodes the given nested type with proper encoding.Encodes the given nested type with proper encoding.
-
Method Details
-
encode
Encodes the given nested type with proper encoding.- Returns:
this
writer- Throws:
IOException
-
encode
Encodes the given nested type with proper encoding.- Returns:
this
writer- Throws:
IOException
-
encode
Encodes the given nested type with proper encoding.- Returns:
this
writer- Throws:
IOException
-
encode
Encodes the given nested type with proper encoding.Adds prefixes and suffixes by media type, such as
"…"
.If the string is translated, comments will be added giving the translation lookup id to aid in translation of server-translated values.
- Returns:
this
writer- Throws:
IOException
-
encode
Encodes the given nested type with proper encoding.Adds prefixes and suffixes by media type, such as
"…"
.If the string is translated, comments will be added giving the translation lookup id to aid in translation of server-translated values.
- Returns:
this
writer- Throws:
IOException
-
encode
Encodes the given nested type with proper encoding.Adds prefixes and suffixes by media type, such as
"…"
.If the string is translated, comments will be added giving the translation lookup id to aid in translation of server-translated values.
- Returns:
this
writer- Throws:
IOException
-
encode
default <Ex extends Throwable> Encode encode(MediaType contentType, IOSupplierE<?, Ex> content) throws IOException, ExEncodes the given nested type with proper encoding.Adds prefixes and suffixes by media type, such as
"…"
.If the string is translated, comments will be added giving the translation lookup id to aid in translation of server-translated values.
- Type Parameters:
Ex
- An arbitrary exception type that may be thrown- Returns:
this
writer- Throws:
IOException
Ex
-
encode
default <Ex extends Throwable> Encode encode(MediaType contentType, MediaWritable<Ex> content) throws IOException, Ex Encodes the given nested type with proper encoding.Adds prefixes and suffixes by media type, such as
"…"
.Does not perform any translation markups.
- Type Parameters:
Ex
- An arbitrary exception type that may be thrown- Returns:
this
writer- Throws:
IOException
Ex
-
encode
Encodes the given nested type with proper encoding. This is well suited for use in a try-with-resources block.Adds prefixes and suffixes by media type, such as
"…"
.Does not perform any translation markups.
- Returns:
- A new writer that may be used for the given content type.
This writer must be closed for completed calls to
MediaEncoder.writeSuffixTo(java.lang.Appendable, boolean)
.The returned writer will be of the specific subclass of
MediaWriter
matchingcontentType
(seeMediaType.getMediaWriterClass()
. This meansMediaWriter.getValidMediaInputType()
will becontentType
. - Throws:
IOException
-