diff src/org/tn5250j/framework/tn5250/DataStreamProducer.java @ 69:294435151b0c tn5250

use 5250 encryption config entry
author Carl Byington <carl@five-ten-sg.com>
date Fri, 13 Jun 2014 19:06:01 -0700
parents 5949eb469a79
children 8181cb01c64d
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/DataStreamProducer.java	Fri Jun 13 16:24:59 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/DataStreamProducer.java	Fri Jun 13 19:06:01 2014 -0700
@@ -16,12 +16,13 @@
 
 public class DataStreamProducer implements Runnable {
     private static final String TAG = "DataStreamProducer";
+   private tnvt                vt;
    private BufferedInputStream bin;
+   private vt320               buffer;
    private ByteArrayOutputStream baosin;
    private Thread me;
    private byte[] saveStream;
    private final BlockingQueue<Object> dsq;
-   private tnvt vt;
    private byte[] abyte2;
    private FileOutputStream fw;
    private BufferedOutputStream dw;
@@ -30,9 +31,10 @@
 
 
 
-   public DataStreamProducer(tnvt vt, BufferedInputStream in, BlockingQueue<Object> queue, byte[] init) {
-      bin = in;
-      this.vt = vt;
+   public DataStreamProducer(tnvt vt, BufferedInputStream bin, vt320 buffer, BlockingQueue<Object> queue, byte[] init) {
+      this.bin    = bin;
+      this.vt     = vt;
+      this.buffer = buffer;
       baosin = new ByteArrayOutputStream();
       dsq = queue;
       abyte2 = init;
@@ -162,7 +164,7 @@
       int i = 0;
 
       while(!done) {
-
+         if (bin.available() == 0) buffer.testChanged();
          i = bin.read();
 
          // WVL - LDC : 16/07/2003 : TR.000345