System.out.println("error restoring screen " + which + " with " + e.getMessage());
log.warn("error restoring screen " + which + " with " + e.getMessage());
   public final void restoreScreen()        throws IOException   {      int which = 0;      try {//         System.out.println("Restore ");         bk.getNextByte();         bk.getNextByte();         int rows = bk.getNextByte() & 0xff;         int cols = bk.getNextByte() & 0xff;         int pos = bk.getNextByte() << 8 & 0xff00;         pos |= bk.getNextByte() & 0xff;         int hPos = bk.getNextByte() << 8 & 0xff00;         hPos |= bk.getNextByte() & 0xff;         if (rows != screen52.getRows())            screen52.setRowsCols(rows,cols);         screen52.clearAll();    // initialize what we currenty have         int b = 32;         int la = 32;         int len = rows * cols;         for (int y = 0;y < len; y++) {            b = bk.getNextByte();            if (isAttribute(b)) {               screen52.screen[y].setCharAndAttr(                           screen52.screen[y].getChar(),                           b,                           true);               la = b;            }            else {              //LDC - 12/02/2003 - Check to see if it is an displayable character. If not,              //  do not convert the character.              //  The characters on screen are in unicode              char ch = (char) b;              if (isDataEBCDIC(b))                ch = ebcdic2uni(b);               screen52.screen[y].setCharAndAttr(                              //getASCIIChar(b),                              ch,                              la,                              false);            }         }         int numFields = bk.getNextByte() << 8 & 0xff00;         numFields |= bk.getNextByte() & 0xff;//         System.out.println("number of fields " + numFields);         if (numFields > 0) {            int x = 0;            int attr = 0;            int fPos = 0;            int fLen = 0;            int ffw1 = 0;            int ffw2 = 0;            int fcw1 = 0;            int fcw2 = 0;            boolean mdt = false;            ScreenField sf = null;            while (x < numFields) {               attr = bk.getNextByte();               fPos = bk.getNextByte() << 8 & 0xff00;               fPos |= bk.getNextByte() & 0xff;               if (bk.getNextByte() == 1)                  mdt = true;               else                  mdt = false;               fLen = bk.getNextByte() << 8 & 0xff00;               fLen |= bk.getNextByte() & 0xff;               ffw1 = bk.getNextByte();               ffw2 = bk.getNextByte();               fcw1 = bk.getNextByte();               fcw2 = bk.getNextByte();               sf = screen52.getScreenFields().setField(attr,                              screen52.getRow(fPos),                              screen52.getCol(fPos),                              fLen,                              ffw1,                              ffw2,                              fcw1,                              fcw2);               if (mdt){                  sf.setMDT();                  screen52.getScreenFields().setMasterMDT();               }//               System.out.println("/nRestored ");//               System.out.println(sf.toString());//               x++;            }         }         screen52.restoreScreen();  // display the screen         screen52.setPendingInsert(true,screen52.getRow(pos),                                          screen52.getCol(pos));         screen52.goto_XY(pos);         screen52.isInField();         if (screen52.isUsingGuiInterface())            screen52.drawFields();      }      catch (Exception e) {         System.out.println("error restoring screen " + which + " with " + e.getMessage());      }   }