From ebaa0bc5d7c1bdf403ef8a51cf9a34fe6537f48b Mon Sep 17 00:00:00 2001 From: lado Date: Mon, 10 Feb 2014 21:20:48 +0100 Subject: encoding set once --- .../src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vdrmanager/src') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java index 9171bcb..3aca77b 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java @@ -65,6 +65,9 @@ public abstract class SvdrpClient { private final Timer watchDog = new Timer(); + private String encoding; + + // private NativeDES crypt = new NativeDES(); public boolean isConnected() { @@ -97,6 +100,7 @@ public abstract class SvdrpClient { final CertificateProblemListener certificateProblemListener) { // results.clear(); this.certificateProblemListener = certificateProblemListener; + encoding = Preferences.get().getEncoding(); } /** @@ -364,7 +368,8 @@ public abstract class SvdrpClient { String line = null; try { - line = lineBytes.toString(Preferences.get().getEncoding()); + line = lineBytes.toString(encoding); + lineBytes.close(); } catch (final UnsupportedEncodingException usex) { Log.w(TAG, usex); line = lineBytes.toString(); -- cgit v1.2.3