EncodingServer (jEdit API Documentation)
Date: 2015-10-20

org.gjt.sp.jedit.io

## Class EncodingServer

- java.lang.Object
- - org.gjt.sp.jedit.io.EncodingServer

-     public class EncodingServer
      extends java.lang.Object

  A class for some static methods to deal with encodings.
  Since:
    4.3pre10

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncodingServer()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Set<java.lang.String>` | `getAvailableNames()` Returns the set of all available encoding names.
    `static Encoding` | `getEncoding(java.lang.String name)` Returns an instance of Encoding for specified name.
    `static java.util.Set<java.lang.String>` | `getSelectedNames()` Returns the set of user selected encoding names.
    `static java.io.Reader` | `getTextReader(java.io.InputStream in, java.lang.String encoding)` Returns a Reader object that reads the InputStream with the encoding.
    `static java.io.Writer` | `getTextWriter(java.io.OutputStream out, java.lang.String encoding)` Returns a Writer object that writes to the OutputStream with the encoding.
    `static boolean` | `hasEncoding(java.lang.String name)` Returns if the specified name is supported as a name for an Encoding.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EncodingServer

          public EncodingServer()

  - ### Method Detail

    - #### getEncoding

          public static Encoding getEncoding(java.lang.String name)

      Returns an instance of Encoding for specified name. The name is used for search the following domains in the listed order. - java.nio.charset.Charset - jEdit ServiceManager

    - #### getAvailableNames

          public static java.util.Set<java.lang.String> getAvailableNames()

      Returns the set of all available encoding names.

    - #### getSelectedNames

          public static java.util.Set<java.lang.String> getSelectedNames()

      Returns the set of user selected encoding names.

    - #### getTextReader

          public static java.io.Reader getTextReader(java.io.InputStream in,
                                                     java.lang.String encoding)
                                              throws java.io.IOException

      Returns a Reader object that reads the InputStream with the encoding. This method is same with "getEncoding(encoding).getTextReader(in)".
      Throws:
        `java.io.IOException`

    - #### getTextWriter

          public static java.io.Writer getTextWriter(java.io.OutputStream out,
                                                     java.lang.String encoding)
                                              throws java.io.IOException

      Returns a Writer object that writes to the OutputStream with the encoding. This method is same with "getEncoding(encoding).getTextWriter(out)".
      Throws:
        `java.io.IOException`

    - #### hasEncoding

          public static boolean hasEncoding(java.lang.String name)

      Returns if the specified name is supported as a name for an Encoding.