Code example for Charset

Methods: encode

0
        } 
        return crc;
    } 
 
    public static byte[] getBytesInUtf8(String in) {
        return sUtf8Codec.encode(in).array();
    } 
 
    // Below are used the detect using database in the render thread. It only 
    // works most of the time, but that's ok because it's for debugging only. 
 
    private static volatile Thread sCurrentThread;
    private static volatile boolean sWarned;
 
    public static void setRenderThread() { 
        sCurrentThread = Thread.currentThread();
    } 
 
    public static void assertNotInRenderThread() { 
        if (!sWarned) {
            if (Thread.currentThread() == sCurrentThread) {