From coverity: set encoding on String to bytes conversion

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2236 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-03-02 18:59:16 +00:00
parent 9f0a87c5a5
commit 8f8e979c6f
1 changed files with 4 additions and 4 deletions

View File

@ -268,11 +268,11 @@ public class AbstractConnection extends Thread {
}
}
protected String base64Encode(String value) {
return new String(new Base64().encode(value.getBytes()));
protected String base64Encode(String value) throws UnsupportedEncodingException {
return new String(Base64.encodeBase64(value.getBytes("UTF-8")), "UTF-8");
}
protected String base64Decode(String value) {
return new String(new Base64().decode(value.getBytes()));
protected String base64Decode(String value) throws UnsupportedEncodingException {
return new String(Base64.decodeBase64(value.getBytes("UTF-8")), "UTF-8");
}
}