public interface TextSerializer<T> extends Serializer<T>
| Modifier and Type | Method and Description |
|---|---|
default char[] |
toCharArray(T object)
Writes the object into a char array.
|
default void |
toFile(T object,
File file)
Writes the object into a
File using an FileWriter. |
default void |
toStream(T object,
OutputStream stream)
Writes the object into an
OutputStream using an
OutputStreamWriter. |
default String |
toString(T object)
Writes the object into a
String using a StringWriter. |
void |
toWriter(T object,
Writer writer)
Writes the object into a
Writer. |
toBytes, toBytesvoid toWriter(T object, Writer writer) throws IOException
Writer.object - the objectwriter - the writerIOException - if an I/O error occursdefault char[] toCharArray(T object) throws IOException
object - the objectIOException - if an I/O error occursdefault String toString(T object) throws IOException
String using a StringWriter.object - the objectIOException - if an I/O error occursdefault void toStream(T object, OutputStream stream) throws IOException
OutputStream using an
OutputStreamWriter.toStream in interface Serializer<T>object - the objectstream - the streamIOException - if an I/O error occursdefault void toFile(T object, File file) throws IOException
File using an FileWriter.toFile in interface Serializer<T>object - the objectfile - the fileIOException - if an I/O error occursCopyright © 2020. All rights reserved.