Class Decoder

java.lang.Object
org.kink_lang.kink.internal.str.Decoder

public class Decoder extends Object
Converter from a sequence of bytes, to a text.
  • Method Details

    • of

      public static Decoder of(Charset cs)
      Returns a new decoder for the charset.
      Parameters:
      cs - the charset.
      Returns:
      a new decoder.
    • terminate

      public void terminate()
      Terminates the decoder. Calling this method twice is not permitted.
    • consume

      public void consume(byte[] bytes)
      Consumes bytes.
      Parameters:
      bytes - consumed bytes.
    • emitText

      public String emitText()
      Emits the remaining text.
      Returns:
      the remaining text.