while (fLen-- > 0) {   planes.setScreenFieldAttr(fPos++,ffw1);  }
	public final void restoreScreen() throws IOException {		int which = 0;      ScreenPlanes planes = screen52.planes;		try {			log.debug("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);					planes.setScreenCharAndAttr(y, planes.getChar(y), 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);					planes.setScreenCharAndAttr(y, ch, la, false);				}			}			int numFields = bk.getNextByte() << 8 & 0xff00;			numFields |= bk.getNextByte() & 0xff;			log.debug("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();					}					if (log.isDebugEnabled()) {						log.debug("/nRestored ");						log.debug(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) {			log.warn("error restoring screen " + which + " with "					+ e.getMessage());		}	}