|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.perforce.p4java.server.PerforceCharsets
public class PerforceCharsets
Encapsulates Perforce-wide charset information for servers.
Unfortunately, support for Unicode and associated charsets is somewhat server- and installation-dependent, and not easy to divine unless you're already talking to a Perforce server -- by which time it's too late. This class is an attempt to make it easier to cut that Gordian knot...
Note that the names below are not actually the standard name for the charset in some cases: e.g. UTF-8 should be "utf-8" not "utf8", but we follow the Perforce server's rules here.
Constructor Summary | |
---|---|
PerforceCharsets()
|
Method Summary | |
---|---|
static Charset |
getJavaCharset(int p4CharsetIndex)
Get Java equivalent charset for a p4 charset index (knownCharsets) |
static String |
getJavaCharsetName(int p4CharsetIndex)
Get Java equivalent charset name for a p4 charset index (knownCharsets) |
static String |
getJavaCharsetName(String p4CharsetName)
Get Java equivalent charset name for a p4 charset name |
static String[] |
getKnownCharsets()
Get known P4 charsets |
static String |
getP4CharsetName(String javaCharsetName)
Get the first matching Perforce equivalent charset name for a given Java charset name. |
static boolean |
isSupported(String p4CharsetName)
Is the P4 charset name specified supported? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerforceCharsets()
Method Detail |
---|
public static String[] getKnownCharsets()
public static String getP4CharsetName(String javaCharsetName)
javaCharsetName
-
public static String getJavaCharsetName(String p4CharsetName)
p4CharsetName
-
public static String getJavaCharsetName(int p4CharsetIndex)
p4CharsetIndex
-
public static Charset getJavaCharset(int p4CharsetIndex)
p4CharsetIndex
-
public static boolean isSupported(String p4CharsetName)
p4CharsetName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |