@Override protected int getLength(String value) { try { return value.getBytes(getCharset()).length; } catch (UnsupportedEncodingException e) { return -1; } }
@Override protected int getLength(String value) { try { return value.getBytes(getCharset()).length; } catch (UnsupportedEncodingException e) { return -1; } }
@Override protected void init() throws Exception { super.init(); assertTrue(LocaleUtil.isCharsetSupported(getCharset()), "Invalid charset: " + getCharset()); }
@Override protected void init() throws Exception { super.init(); assertTrue(LocaleUtil.isCharsetSupported(getCharset()), "Invalid charset: " + getCharset()); }
@Override protected int getLength(String value) { try { return value.getBytes(getCharset()).length; } catch (UnsupportedEncodingException e) { return -1; } }
@Override protected void init() throws Exception { super.init(); assertTrue(LocaleUtil.isCharsetSupported(getCharset()), "Invalid charset: " + getCharset()); }