|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.clientserver.SystemEncodingUtil
A singleton class that contains useful methods related to encodings.
Field Summary | |
---|---|
static String |
ENCODING_UTF_8
|
Method Summary | |
---|---|
String |
getEncodingFromBOM(String filePath)
Gets the encoding from the Byte Order Mark (BOM). |
String |
getEnvironmentEncoding()
Gets the encoding of the environment. |
static SystemEncodingUtil |
getInstance()
Returns the singleton instance of the utility class. |
String |
getXMLFileEncoding(String filePath)
Gets the encoding of an XML file. |
boolean |
isXML(String filePath)
Returns whether the file is an XML file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static String ENCODING_UTF_8
Method Detail |
public static SystemEncodingUtil getInstance()
public String getEnvironmentEncoding()
public boolean isXML(String filePath)
filePath
- the file path.
true
if the file is an XML file, false
otherwise.public String getXMLFileEncoding(String filePath) throws IOException
filePath
- the file path.
null
if the encoding could not be determined.
IOException
public String getEncodingFromBOM(String filePath) throws IOException
filePath
- the file path.
null
if there is no BOM.
IOException
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |