summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2014-02-10 21:20:48 +0100
committerlado <herrlado@gmail.com>2014-02-10 21:20:48 +0100
commitebaa0bc5d7c1bdf403ef8a51cf9a34fe6537f48b (patch)
tree02b69e3fe97405dfb377fb66fb516d92fec7732c /vdrmanager/src
parent638064b6fce0ff754c1296432aa84c267233742a (diff)
downloadvdr-manager-ebaa0bc5d7c1bdf403ef8a51cf9a34fe6537f48b.tar.gz
vdr-manager-ebaa0bc5d7c1bdf403ef8a51cf9a34fe6537f48b.tar.bz2
encoding set once
Diffstat (limited to 'vdrmanager/src')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/SvdrpClient.java7
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();