Package io.github.netvl.ecoji
Class Ecoji.Encoder.Target
- java.lang.Object
 - 
- io.github.netvl.ecoji.Ecoji.Encoder.Target
 
 
- 
- Enclosing class:
 - Ecoji.Encoder
 
public static class Ecoji.Encoder.Target extends java.lang.ObjectAn intermediate class, needed to implement the builder-like DSL for encoding. 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intwriteTo(java.io.Writer writer)Writes the base-1024 representation of bytes contained in the previously specified source to the providedWriter.java.lang.StringwriteToString()Writes the base-1024 representation of bytes contained in the previously specified source as aString. 
 - 
 
- 
- 
Method Detail
- 
writeTo
public int writeTo(java.io.Writer writer) throws java.io.IOExceptionWrites the base-1024 representation of bytes contained in the previously specified source to the providedWriter.Note that most of the emoji used in the alphabet do not belong to the Basic Multilingual Plane, therefore they are encoded as a pair of UTF-16 code units, i.e. as a surrogate pair.
The passed
Writerwill not be closed after the operation finishes.- Parameters:
 writer- AnWriterwhich will accept the Ecoji-encoded data.- Returns:
 - A number of 
chars written to the providedWriter. - Throws:
 java.io.IOException- If an error has happened during a read or a write operation.
 
- 
writeToString
public java.lang.String writeToString() throws java.io.IOExceptionWrites the base-1024 representation of bytes contained in the previously specified source as aString.Note that most of the emoji used in the alphabet do not belong to the Basic Multilingual Plane, therefore they are encoded as a pair of UTF-16 code units, i.e. as a surrogate pair.
- Returns:
 - A 
Stringcontaining the base-1024 representation of the input. - Throws:
 java.io.IOException- If an error has happened during a read operation.
 
 - 
 
 -