Class TextEncoder


  • public class TextEncoder
    extends Encoder<java.lang.String>
    Text encoder.
    • Constructor Summary

      Constructors 
      Constructor Description
      TextEncoder()
      Constructs a new text encoder.
      TextEncoder​(java.nio.charset.Charset charset)
      Constructs a new text encoder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(java.lang.String value, java.io.Writer writer)
      Writes a value to a character stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextEncoder

        public TextEncoder()
        Constructs a new text encoder.
      • TextEncoder

        public TextEncoder​(java.nio.charset.Charset charset)
        Constructs a new text encoder.
        Parameters:
        charset - The character set to use when encoding the text.
    • Method Detail

      • write

        public void write​(java.lang.String value,
                          java.io.Writer writer)
                   throws java.io.IOException
        Description copied from class: Encoder
        Writes a value to a character stream.
        Specified by:
        write in class Encoder<java.lang.String>
        Parameters:
        value - The value to encode.
        writer - The character stream to write to.
        Throws:
        java.io.IOException - If an exception occurs.