com.perforce.p4java.impl.mapbased.rpc.sys.helper
Class UnicodeHelper

java.lang.Object
  extended by com.perforce.p4java.impl.mapbased.rpc.sys.helper.UnicodeHelper

public class UnicodeHelper
extends Object

Provides default and / or bridged (to Eclipse, etc.) Unicode helper methods. May disappear or be moved in a future refactoring.


Constructor Summary
UnicodeHelper()
           
 
Method Summary
static boolean inferCharset(byte[] bytes, int bytesRead, Charset clientCharset)
          Try to determine whether a byte buffer's character encoding is that of the passed-in charset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnicodeHelper

public UnicodeHelper()
Method Detail

inferCharset

public static boolean inferCharset(byte[] bytes,
                                   int bytesRead,
                                   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.



Copyright © 2015 Perforce Software. All Rights Reserved.