summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();