Class UnicodeHelper
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.rpc.sys.helper.UnicodeHelper
-
public class UnicodeHelper extends java.lang.Object
Provides default and / or bridged (to Eclipse, etc.) Unicode helper methods. May disappear or be moved in a future refactoring.
-
-
Constructor Summary
Constructors Constructor Description UnicodeHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
inferCharset(byte[] bytes, int bytesRead, java.nio.charset.Charset clientCharset)
Try to determine whether a byte buffer's character encoding is that of the passed-in charset.
-
-
-
Method Detail
-
inferCharset
public static boolean inferCharset(byte[] bytes, int bytesRead, java.nio.charset.Charset clientCharset)
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
-
-