diff options
author | lado <herrlado@gmail.com> | 2014-02-10 21:20:48 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2014-02-10 21:20:48 +0100 |
commit | ebaa0bc5d7c1bdf403ef8a51cf9a34fe6537f48b (patch) | |
tree | 02b69e3fe97405dfb377fb66fb516d92fec7732c | |
parent | 638064b6fce0ff754c1296432aa84c267233742a (diff) | |
download | vdr-manager-ebaa0bc5d7c1bdf403ef8a51cf9a34fe6537f48b.tar.gz vdr-manager-ebaa0bc5d7c1bdf403ef8a51cf9a34fe6537f48b.tar.bz2 |
encoding set once
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java | 7 |
1 files changed, 6 insertions, 1 deletions
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<Result> { 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<Result> { final CertificateProblemListener certificateProblemListener) { // results.clear(); this.certificateProblemListener = certificateProblemListener; + encoding = Preferences.get().getEncoding(); } /** @@ -364,7 +368,8 @@ public abstract class SvdrpClient<Result> { 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(); |