|
RSE Release 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.rse.services.clientserver.SystemEncodingUtil
public class SystemEncodingUtil
A singleton class that contains useful methods related to encodings.
| Nested Class Summary | |
|---|---|
static class |
SystemEncodingUtil.DefaultEncodingProvider
Provider for the default encodings that RSE uses. |
| Field Summary | |
|---|---|
static java.lang.String |
ENCODING_UTF_8
|
| Method Summary | |
|---|---|
java.lang.String |
getEncodingFromBOM(java.lang.String filePath)
Gets the encoding from the Byte Order Mark (BOM). |
java.lang.String |
getEnvironmentEncoding()
Gets the encoding of the environment. |
static SystemEncodingUtil |
getInstance()
Returns the singleton instance of the utility class. |
java.lang.String |
getLocalDefaultEncoding()
Returns the local default encoding as provided by the default encoding provider. |
java.lang.String |
getXMLFileEncoding(java.lang.String filePath)
Gets the encoding of an XML file. |
boolean |
isXML(java.lang.String filePath)
Returns whether the file is an XML file. |
void |
setDefaultEncodingProvider(SystemEncodingUtil.DefaultEncodingProvider p)
Change the default encoding provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String ENCODING_UTF_8
| Method Detail |
|---|
public static SystemEncodingUtil getInstance()
public void setDefaultEncodingProvider(SystemEncodingUtil.DefaultEncodingProvider p)
p - the new encoding provider.public java.lang.String getLocalDefaultEncoding()
public java.lang.String getEnvironmentEncoding()
public boolean isXML(java.lang.String filePath)
filePath - the file path.
true if the file is an XML file, false otherwise.
public java.lang.String getXMLFileEncoding(java.lang.String filePath)
throws java.io.IOException
filePath - the file path.
null if the encoding could not be determined.
java.io.IOException
public java.lang.String getEncodingFromBOM(java.lang.String filePath)
throws java.io.IOException
filePath - the file path.
null if there is no BOM.
java.io.IOException
|
RSE Release 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||