Code example for UnsupportedEncodingException

Methods: printStackTrace

0
             
            return new String(b,offset,length,__UTF8);
        } 
        catch (UnsupportedEncodingException e)
        { 
            e.printStackTrace();
            return null; 
        } 
    } 
 
    /* ------------------------------------------------------------ */ 
    public static String toString(byte[] b,int offset,int length,String charset)
    { 
        if (charset==null || StringUtil.isUTF8(charset))
            return toUTF8String(b,offset,length);
         
        try 
        { 
            return new String(b,offset,length,charset);
        } 
        catch (UnsupportedEncodingException e)