vt.negotiate(baosin.toByteArray());
vt.negotiate(rBytes);  return null;
   public final byte[] readIncoming()        throws IOException {      boolean done = false;      boolean negotiate = false;      baosin.reset();      int j = -1;      int i = 0;      while(!done) {         i = bin.read();         // WVL - LDC : 16/07/2003 : TR.000345         // The inStream return -1 when end-of-stream is reached. This         // happens e.g. when the connection is closed from the AS/400.         // So we stop in this case!         // ==> an empty byte array is returned from this method.         if (i == -1) // nothing read!         {           done = true;            vt.disconnect();           continue;         }         // We use the values instead of the static values IAC and EOR         //    because they are defined as bytes.         //         // The > if(i != 255 || j != 255)  < is a hack for the double FF FF's         // that are being returned.  I do not know why this is like this and         // can not find any documentation for it.  It is also being returned         // on my Client Access tcp dump as well so they are handling it.         //         // my5250         // 0000:  00 50 DA 44 C8 45 42 00 00 00 00 24 08 00 45 00 .P.D.EB....$..E.         // 0010:  04 2A BC F9 00 00 40 06 D0 27 C1 A8 33 04 C1 A8 .*....@..'..3...         // 0020:  33 58 00 17 04 18 6F A2 83 CB 00 1E D1 BA 50 18 3X....o.......P.         // 0030:  20 00 8A 9A 00 00 03 FF FF 12 A0 00 00 04 00 00  ...............         // --------------------------- || || -------------------------------------         // 0040:  03 04 40 04 11 00 20 01 07 00 00 00 18 00 00 10 ..@... .........         if(j == 255 && i == 255) {            j = -1;            continue;         }         else {            baosin.write(i);            // check for end of record EOR and IAC  - FFEF            if(j == 255 && i == 239)               done = true;            // This is to check for the TELNET TIMING MARK OPTION            // rfc860 explains this in more detail.  When we receive it            // we will negotiate with the server by sending a WONT'T TIMING-MARK            // This will let the server know that we processed the information            // and are just waiting for the user to enter some data so keep the            // socket alive.   This is more or less a AYT (ARE YOU THERE) or not.            if(i == 253 && j == 255) {               done = true;               negotiate = true;            }            j = i;         }     }     // after the initial negotiation we might get other options such as     //    timing marks ??????????????  do we ???????????? look at telnet spec     // yes we do. rfc860 explains about timing marks.         if (negotiate) {            // get the negotiation option            baosin.write(bin.read());            vt.negotiate(baosin.toByteArray());         }         if (dumpBytes) {            dump(baosin.toByteArray());         }        return baosin.toByteArray();    }