Package io.github.netvl.ecoji
Class Ecoji.Decoder
- java.lang.Object
 - 
- io.github.netvl.ecoji.Ecoji.Decoder
 
 
- 
- Enclosing class:
 - Ecoji
 
public static class Ecoji.Decoder extends java.lang.ObjectDecodes Unicode character sources from a base-1024 representation with an emoji alphabet into bytes. Use one of thereadFrom()methods to start the decoding process. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEcoji.Decoder.TargetAn intermediate class, needed to implement the builder-like DSL for decoding. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ecoji.Decoder.TargetreadFrom(java.io.Reader reader)Uses the providedReaderas a source of emoji characters.Ecoji.Decoder.TargetreadFrom(java.lang.String string)Uses the providedStringas a source of emoji characters. 
 - 
 
- 
- 
Method Detail
- 
readFrom
public Ecoji.Decoder.Target readFrom(java.io.Reader reader)
Uses the providedReaderas a source of emoji characters.The provided stream will be read entirely, however, it won't be closed automatically. It is expected that the entirety of the stream is a valid Ecoji-encoded data; if any of the code points read from the stream do not belong to the Ecoji alphabet, an exception will be thrown. An exception will also be thrown if the number of code points in the input is not a multiple of 4.
- Parameters:
 reader- AReaderwhich contains Ecoji-encoded data.- Returns:
 - An intermediate object used to specify the destination of the decoding process.
 
 
- 
readFrom
public Ecoji.Decoder.Target readFrom(java.lang.String string)
Uses the providedStringas a source of emoji characters.It is expected that the entire string contains valid Ecoji-encoded data; if any of the code points of which the string consists of do not belong to the Ecoji alphabet, an exception will be thrown. An exception will also be thrown if the number of code points in the string is not a multiple of 4.
- Parameters:
 string- AStringcontaining Ecoji-encoded data.- Returns:
 - An intermediate object used to specify the destination of the decoding process.
 
 
 - 
 
 -