java.lang.Object
org.gjt.sp.jedit.io.EncodingServer
A class for some static methods to deal with encodings.
- Since:
- 4.3pre10
- Author:
- Kazutoshi Satoda
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the set of all available encoding names.static Encoding
getEncoding
(String name) Returns an instance of Encoding for specified name.Returns the set of user selected encoding names.static Reader
getTextReader
(InputStream in, String encoding) Returns a Reader object that reads the InputStream with the encoding.static Writer
getTextWriter
(OutputStream out, String encoding) Returns a Writer object that writes to the OutputStream with the encoding.static boolean
hasEncoding
(String name) Returns if the specified name is supported as a name for an Encoding.
-
Constructor Details
-
EncodingServer
public EncodingServer()
-
-
Method Details
-
getEncoding
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
Returns the set of all available encoding names. -
getSelectedNames
Returns the set of user selected encoding names. -
getTextReader
Returns a Reader object that reads the InputStream with the encoding. This method is same with "getEncoding(encoding).getTextReader(in)".- Throws:
IOException
-
getTextWriter
Returns a Writer object that writes to the OutputStream with the encoding. This method is same with "getEncoding(encoding).getTextWriter(out)".- Throws:
IOException
-
hasEncoding
Returns if the specified name is supported as a name for an Encoding.
-