Class UnicodeHelper
java.lang.Object
com.perforce.p4java.impl.mapbased.rpc.sys.helper.UnicodeHelper
Provides default and / or bridged (to Eclipse, etc.) Unicode helper
methods. May disappear or be moved in a future refactoring.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleaninferCharset(byte[] bytes, int bytesRead, Charset clientCharset) Try to determine whether a byte buffer's character encoding is that of the passed-in charset.
-
Constructor Details
-
UnicodeHelper
public UnicodeHelper()
-
-
Method Details
-
inferCharset
Try to determine whether a byte buffer's character encoding is that of the passed-in charset. Uses inefficient heuristics that will be revisited when we're more familiar with likely usage patterns.Note this has been heavily changed since inception and will almost certainly disappear in the 10.x timeframe -- HR.
- Parameters:
bytes- bytesbytesRead- bytesReadclientCharset- clientCharset- Returns:
- ok
-