bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public int getLocationOfTyp_L_PathTable() { return locationOfTyp_L_PathTable; }
public int getLocationOfTyp_L_PathTable() { return locationOfTyp_L_PathTable; }
13,691
public int getLocationOfTyp_M_PathTable() { return locationOfTyp_M_PathTable; }
public int getLocationOfTyp_M_PathTable() { return locationOfTyp_M_PathTable; }
13,692
public int getNumberOfLB() { return numberOfLB; }
public int getNumberOfLB() { return numberOfLB; }
13,693
public int getPathTableSize() { return pathTableSize; }
public int getPathTableSize() { return pathTableSize; }
13,694
public EntryRecord getRootDirectoryEntry() { return rootDirectoryEntry; }
public EntryRecord getRootDirectoryEntry() { return rootDirectoryEntry; }
13,695
public String getStandardIdentifier() { return standardIdentifier; }
public String getStandardIdentifier() { return standardIdentifier; }
13,696
public String getSystemIdentifier() { return systemIdentifier; }
public String getSystemIdentifier() { return systemIdentifier; }
13,697
public int getType() { return type; }
public int getType() { return type; }
13,698
public ISO9660Volume getVolume() { return volume; }
public ISO9660Volume getVolume() { return volume; }
13,699
public String getVolumeIdentifier() { return volumeIdentifier; }
public String getVolumeIdentifier() { return volumeIdentifier; }
13,700
public String getVolumeSetIdentifier() { return volumeSetIdentifier; }
public String getVolumeSetIdentifier() { return volumeSetIdentifier; }
13,701
public int getVolumeSetSize() { return volumeSetSize; }
public int getVolumeSetSize() { return volumeSetSize; }
13,702
public void printOut() { System.out.println("Primary volume information: "); System.out.println(" - Standard Identifier: " + this.getStandardIdentifier()); System.out.println(" - System Identifier: " + this.getSystemIdentifier()); System.out.println(" - Volume Identifier: " + this.getVolumeIdentifier()); System.out.println(" - Volume set Identifier: " + this.getVolumeSetIdentifier()); System.out.println(" - Volume set size: " + this.getVolumeSetSize()); System.out.println(" - Number of LBs: " + this.getNumberOfLB()); System.out.println(" - Size of LBs: " + this.getLBSize()); System.out.println(" - PathTable size: " + this.getPathTableSize()); System.out.println(" - Location of L PathTable : " + this.getLocationOfTyp_L_PathTable()); System.out.println(" - Location of Optional L PathTable : " + this.getLocationOfOptionalTyp_L_PathTable()); System.out.println(" - Location of M PathTable : " + this.getLocationOfTyp_M_PathTable()); System.out.println(" - Location of Optional M PathTable : " + this.getLocationOfOptionalTyp_M_PathTable()); System.out.println(" - Root directory entry: " ); System.out.println(" - Size: " + this.getRootDirectoryEntry().getLengthOfDirectoryEntry()); System.out.println(" - Extended attribute size: " + this.getRootDirectoryEntry().getLengthOfExtendedAttribute()); System.out.println(" - Location of the extent: " + this.getRootDirectoryEntry().getLocationOfExtent()); System.out.println(" - Length of the file identifier: " + this.getRootDirectoryEntry().getLengthOfFileIdentifier()); System.out.println(" - is directory: " + this.getRootDirectoryEntry().isDirectory()); System.out.println(" - File identifier: " + this.getRootDirectoryEntry().getFileIdentifier()); System.out.println(" - Data Length: " + this.getRootDirectoryEntry().getDataLength()); System.out.println(" - File unit size: " + this.getRootDirectoryEntry().getFileUnitSize()); }
public void printOut() { System.out.println("Primary volume information: "); System.out.println(" - Standard Identifier: " + this.getStandardIdentifier()); System.out.println(" - System Identifier: " + this.getSystemIdentifier()); System.out.println(" - Volume Identifier: " + this.getVolumeIdentifier()); System.out.println(" - Volume set Identifier: " + this.getVolumeSetIdentifier()); System.out.println(" - Volume set size: " + this.getVolumeSetSize()); System.out.println(" - Number of LBs: " + this.getNumberOfLB()); System.out.println(" - Size of LBs: " + this.getLBSize()); System.out.println(" - PathTable size: " + this.getPathTableSize()); System.out.println(" - Location of L PathTable : " + this.getLocationOfTyp_L_PathTable()); System.out.println(" - Location of Optional L PathTable : " + this.getLocationOfOptionalTyp_L_PathTable()); System.out.println(" - Location of M PathTable : " + this.getLocationOfTyp_M_PathTable()); System.out.println(" - Location of Optional M PathTable : " + this.getLocationOfOptionalTyp_M_PathTable()); System.out.println(" - Root directory entry: " ); System.out.println(" - Size: " + this.getRootDirectoryEntry().getLengthOfDirectoryEntry()); System.out.println(" - Extended attribute size: " + this.getRootDirectoryEntry().getLengthOfExtendedAttribute()); System.out.println(" - Location of the extent: " + this.getRootDirectoryEntry().getLocationOfExtent()); System.out.println(" - Length of the file identifier: " + this.getRootDirectoryEntry().getLengthOfFileIdentifier()); System.out.println(" - is directory: " + this.getRootDirectoryEntry().isDirectory()); System.out.println(" - File identifier: " + this.getRootDirectoryEntry().getFileIdentifier()); System.out.println(" - Data Length: " + this.getRootDirectoryEntry().getDataLength()); System.out.println(" - File unit size: " + this.getRootDirectoryEntry().getFileUnitSize()); }
13,703
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
13,704
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
13,705
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalSliderUI instance; if (o == null) { instance = new MetalSliderUI(); instances.put(component, instance); } else instance = (MetalSliderUI) o; return instance; }
publicstaticComponentUIcreateUI(JComponentcomponent){if(instances==null)instances=newHashMap();Objecto=instances.get(component);MetalSliderUIinstance;if(o==null){instance=newMetalSliderUI(); instances.put(component,instance);}elseinstance=(MetalSliderUI)o;returninstance;}
13,707
EmitterContext(AbstractX86Stream os, X86CompilerHelper helper, VirtualStack vstack, X86RegisterPool pool) { this.os = os; this.helper = helper; this.vstack = vstack; this.pool = pool; }
EmitterContext(AbstractX86Stream os, X86CompilerHelper helper, VirtualStack vstack, X86RegisterPool pool, ItemFactory ifac) { this.os = os; this.helper = helper; this.vstack = vstack; this.pool = pool; }
13,709
X86CompilerHelper getHelper() { return helper; }
final X86CompilerHelper getHelper() { return helper; }
13,711
X86RegisterPool getPool() { return pool; }
final X86RegisterPool getPool() { return pool; }
13,712
AbstractX86Stream getStream() { return os; }
final AbstractX86Stream getStream() { return os; }
13,713
VirtualStack getVStack() { return vstack; }
final VirtualStack getVStack() { return vstack; }
13,714
public void startProduction(ImageConsumer ic) { if (! (consumers.contains(ic))) consumers.addElement(ic); Vector list = (Vector) consumers.clone(); for (int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture(ic); if (animated) ic.imageComplete(ImageConsumer.SINGLEFRAME); else ic.imageComplete(ImageConsumer.STATICIMAGEDONE); } }
public void startProduction(ImageConsumer ic) { if (! (consumers.contains(ic))) consumers.addElement(ic); Vector list = (Vector) consumers.clone(); for (int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture(ic); if (animated) ic.imageComplete(ImageConsumer.SINGLEFRAME); else ic.imageComplete(ImageConsumer.STATICIMAGEDONE); } }
13,716
public static AlreadyBound extract(Any a) { try { return ((AlreadyBoundHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION(); } }
public static AlreadyBound extract(Any a) { try { return ((AlreadyBoundHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION(); bad.initCause(ex); bad.minor = Minor.Any; throw bad; } }
13,717
public void action (SaxDocumentHandler handler) { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) return; // now we are ready to read in untagged data (both delimited/formmatted styles) // from the DATABLOCK // Note: unfortunately we are reduced to using regex style matching // instead of a buffer read in formatted reads. Come back and // improve this later if possible. XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle(); if ( formatObj instanceof DelimitedXMLDataIOStyle || formatObj instanceof FormattedXMLDataIOStyle ) { // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } Locator myLocator = CurrentArray.createLocator(); myLocator.setIterationOrder(AxisReadOrder); // CurrentIOCmdIndex = 0; CurrentDataFormatIndex = 0; ArrayList strValueList; // set up appropriate instructions for reading if ( formatObj instanceof FormattedXMLDataIOStyle ) { // snag the string representation of the values strValueList = formattedSplitStringIntoStringObjects( DATABLOCK.toString(), ((FormattedXMLDataIOStyle) formatObj) ); if (strValueList.size() == 0) { Log.errorln("Error: XDF Reader is unable to acquire formatted data, bad format?"); System.exit(-1); } } else { // snag the string representation of the values strValueList = splitStringIntoStringObjects( DATABLOCK.toString(), ((DelimitedXMLDataIOStyle) formatObj).getDelimiter(), ((DelimitedXMLDataIOStyle) formatObj).getRepeatable(), ((DelimitedXMLDataIOStyle) formatObj).getRecordTerminator() ); } // fire data into dataCube Iterator iter = strValueList.iterator(); while (iter.hasNext()) { DataFormat CurrentDataFormat = DataFormatList[CurrentDataFormatIndex]; // adding data based on what type.. String thisData = (String) iter.next(); addDataToCurrentArray(myLocator, thisData, CurrentDataFormat, IntRadix[CurrentDataFormatIndex]); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = myLocator.getAxisIndex(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate ) { LastFastAxisCoordinate = currentFastAxisCoordinate; if (CurrentDataFormatIndex == MaxDataFormatIndex) CurrentDataFormatIndex = 0; else CurrentDataFormatIndex++; } } myLocator.next(); } } else if ( formatObj instanceof TaggedXMLDataIOStyle ) { // Tagged case: do nothing } else { Log.errorln("ERROR: Completely unknown DATA IO style:"+formatObj.toString() +" aborting read!"); System.exit(-1); } }
publicvoidaction(SaxDocumentHandlerhandler){//westoppedreadingdatanode,lowercountbyoneDataNodeLevel--;//wemightstillbenestedwithinadatanode//ifso,returnnowtoaccumulatemoredatawithintheDATABLOCKif(DataNodeLevel!=0)return;//nowwearereadytoreadinuntaggeddata(bothdelimited/formmattedstyles)//fromtheDATABLOCK//Note:unfortunatelywearereducedtousingregexstylematching//insteadofabufferreadinformattedreads.Comebackand//improvethislaterifpossible.XMLDataIOStyleformatObj=CurrentArray.getXMLDataIOStyle();if(formatObjinstanceofDelimitedXMLDataIOStyle||formatObjinstanceofFormattedXMLDataIOStyle){//determinethesizeofthedataFormat(s)inourdataCubeif(CurrentArray.hasFieldAxis()){//ifthereisafieldaxis,thenitssettothenumberoffieldsFieldAxisfieldAxis=CurrentArray.getFieldAxis();MaxDataFormatIndex=(fieldAxis.getLength()-1);}else{//itshomogeneousMaxDataFormatIndex=0;}LocatormyLocator=CurrentArray.createLocator();myLocator.setIterationOrder(AxisReadOrder);//CurrentIOCmdIndex=0;CurrentDataFormatIndex=0;ArrayListstrValueList;//setupappropriateinstructionsforreadingif(formatObjinstanceofFormattedXMLDataIOStyle){//snagthestringrepresentationofthevaluesstrValueList=formattedSplitStringIntoStringObjects(DATABLOCK.toString(),((FormattedXMLDataIOStyle)formatObj));if(strValueList.size()==0){Log.errorln("Error:XDFReaderisunabletoacquireformatteddata,badformat?");System.exit(-1);}}else{//snagthestringrepresentationofthevaluesstrValueList=splitStringIntoStringObjects(DATABLOCK.toString(),((DelimitedXMLDataIOStyle)formatObj).getDelimiter(),((DelimitedXMLDataIOStyle)formatObj).getRepeatable(),((DelimitedXMLDataIOStyle)formatObj).getRecordTerminator());}//firedataintodataCubeIteratoriter=strValueList.iterator();while(iter.hasNext()){DataFormatCurrentDataFormat=DataFormatList[CurrentDataFormatIndex];//addingdatabasedonwhattype..StringthisData=(String)iter.next();addDataToCurrentArray(myLocator,thisData,CurrentDataFormat,IntRadix[CurrentDataFormatIndex]);//bumpupDataFormatappropriatelyif(MaxDataFormatIndex>0){intcurrentFastAxisCoordinate=myLocator.getAxisIndex(FastestAxis);if(currentFastAxisCoordinate!=LastFastAxisCoordinate){LastFastAxisCoordinate=currentFastAxisCoordinate;if(CurrentDataFormatIndex==MaxDataFormatIndex)CurrentDataFormatIndex=0;elseCurrentDataFormatIndex++;}}myLocator.next();}}elseif(formatObjinstanceofTaggedXMLDataIOStyle){//Taggedcase:donothing}else{Log.errorln("ERROR:CompletelyunknownDATAIOstyle:"+formatObj.toString()+"abortingread!");System.exit(-1);}}
13,719
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // for node sets the iteration order for how we will setData // in the datacube (important for delimited and formatted reads). int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); if (name.equals("axisIdRef") ) { AxisReadOrder.add(AxisObj.get(attrs.getValue(i))); } else Log.warnln("Warning: got weird attribute:"+name+" on for node"); } return (Object) null; }
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // for node sets the iteration order for how we will setData // in the datacube (important for delimited and formatted reads). int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); if (name.equals("axisIdRef") ) { AxisReadOrder.add(0, AxisObj.get(attrs.getValue(i))); } else Log.warnln("Warning: got weird attribute:"+name+" on for node"); } return (Object) null; }
13,720
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = (Parameter) CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
13,721
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = (Parameter) CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
13,722
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = (Parameter) ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
13,723
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = (Parameter) ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
13,724
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // The root node is just a "structure" node, // but is always the first one. XDF.setXMLAttributes(attrs); // set XML attributes from passed list CurrentStructure = XDF; // current working structure is now the root // structure // if this global option is set in the reader, we use it if(Options.contains("DefaultDataDimensionSize")) { int value = ((Integer) Options.get("DefaultDataDimensionSize")).intValue(); Specification.getInstance().setDefaultDataArraySize(value); } return CurrentStructure; }
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // The root node is just a "structure" node, // but is always the first one. XDF.setXMLAttributes(attrs); // set XML attributes from passed list setCurrentStructure(XDF); // current working structure is now the root // structure // if this global option is set in the reader, we use it if(Options.contains("DefaultDataDimensionSize")) { int value = ((Integer) Options.get("DefaultDataDimensionSize")).intValue(); Specification.getInstance().setDefaultDataArraySize(value); } return CurrentStructure; }
13,725
private Array appendArrayToArray (Array arrayToAppendTo, Array arrayToAdd) { if (arrayToAppendTo != null) { List origAxisList = arrayToAppendTo.getAxes(); List addAxisList = arrayToAdd.getAxes(); Hashtable correspondingAddAxis = new Hashtable(); Hashtable correspondingOrigAxis = new Hashtable(); // 1. determine the proper alignment of the axes between both arrays // Then cross-reference each in lookup Hashtables. Iterator iter = origAxisList.iterator(); while (iter.hasNext()) { AxisInterface origAxis = (AxisInterface) iter.next(); String align = origAxis.getAlign(); // search the list of the other array for a matching axis boolean gotAMatch = false; Iterator iter2 = addAxisList.iterator(); while (iter2.hasNext()) { AxisInterface addAxis = (AxisInterface) iter2.next(); String thisAlign = addAxis.getAlign(); if(thisAlign != null) { if(thisAlign.equals(align)) { correspondingAddAxis.put(origAxis.getAxisId(), addAxis); correspondingOrigAxis.put(addAxis.getAxisId(), origAxis); gotAMatch = true; break; } } else { Log.errorln("Cant align axes, axis missing defined align attribute. Aborting."); return arrayToAppendTo; } } // no match?? then alignments are mis-specified. if (!gotAMatch) { Log.errorln("Cant align axes, axis has align attribute that is mis-specified. Aborting."); return arrayToAppendTo; } } // 2. "Append" axis values to original axis. Because // there are 2 different ways to add in data we either // have a pre-existing axis value, in which case we dont // need to expand the existing axis, or there is no pre-existing // value so we tack it in. We need to figure out here if an // axis value already exists, and if it doesnt then we add it in. // Iterator iter3 = origAxisList.iterator(); while (iter3.hasNext()) { AxisInterface origAxis = (AxisInterface) iter3.next(); AxisInterface addAxis = (AxisInterface) correspondingAddAxis.get(origAxis.getAxisId()); if (addAxis instanceof Axis && origAxis instanceof Axis) { List valuesToAdd = ((Axis) addAxis).getAxisValues(); Iterator iter4 = valuesToAdd.iterator(); while (iter4.hasNext()) { Value value = (Value) iter4.next(); if (((Axis) origAxis).getIndexFromAxisValue(value) == -1) { ((Axis) origAxis).addAxisValue(value); } } } else if (addAxis instanceof FieldAxis && origAxis instanceof FieldAxis) { // both are fieldAxis Log.errorln("Dont know how to merge field Axis data. Aborting."); System.exit(-1); } else { // mixed class Axes?? (e.g. a fieldAxis id matches Axis id??!? Error!!) Log.errorln("Dont know how to merge data. Aborting."); System.exit(-1); } } // 3. Append data from one array to the other appropriately Locator origLocator = arrayToAppendTo.createLocator(); Locator addLocator = arrayToAdd.createLocator(); while (addLocator.hasNext()) { try { // retrieve the data Object data = arrayToAdd.getData(addLocator); // set up the origLocator List locatorAxisList = addLocator.getIterationOrder(); Iterator iter5 = locatorAxisList.iterator(); Log.debug("Appending data to array("); while (iter5.hasNext()) { Axis addAxis = (Axis) iter5.next(); Value thisAxisValue = addLocator.getAxisValue(addAxis); Axis thisAxis = (Axis) correspondingOrigAxis.get(addAxis.getAxisId()); try { origLocator.setAxisIndexByAxisValue(thisAxis, thisAxisValue); Log.debug(origLocator.getAxisIndex(thisAxis)+","); } catch (AxisLocationOutOfBoundsException e) { Log.errorln("Weird axis out of bounds error for append array."); } } // add in the data as appropriate. Log.debugln(") => ["+data.toString()+"]"); try { if (data instanceof Double) arrayToAppendTo.setData(origLocator, (Double) data); else if (data instanceof Integer) arrayToAppendTo.setData(origLocator, (Integer) data); else if (data instanceof String ) arrayToAppendTo.setData(origLocator, (String) data); else Log.errorln("Cant understand class of data !(Double|Integer|String). ignoring append"); } catch (SetDataException e) { Log.errorln("Cant setData. Ignoring append"); } } catch (NoDataException e) { // do nothing for NoDataValues?? } addLocator.next(); // go to next location } } else Log.errorln("Cannot append to null array. Ignoring request."); return arrayToAppendTo; }
private ArrayInterface appendArrayToArray ( ArrayInterface arrayToAppendTo, ArrayInterface arrayToAdd ) { if (arrayToAppendTo != null) { List origAxisList = arrayToAppendTo.getAxes(); List addAxisList = arrayToAdd.getAxes(); Hashtable correspondingAddAxis = new Hashtable(); Hashtable correspondingOrigAxis = new Hashtable(); // 1. determine the proper alignment of the axes between both arrays // Then cross-reference each in lookup Hashtables. Iterator iter = origAxisList.iterator(); while (iter.hasNext()) { AxisInterface origAxis = (AxisInterface) iter.next(); String align = origAxis.getAlign(); // search the list of the other array for a matching axis boolean gotAMatch = false; Iterator iter2 = addAxisList.iterator(); while (iter2.hasNext()) { AxisInterface addAxis = (AxisInterface) iter2.next(); String thisAlign = addAxis.getAlign(); if(thisAlign != null) { if(thisAlign.equals(align)) { correspondingAddAxis.put(origAxis.getAxisId(), addAxis); correspondingOrigAxis.put(addAxis.getAxisId(), origAxis); gotAMatch = true; break; } } else { Log.errorln("Cant align axes, axis missing defined align attribute. Aborting."); return arrayToAppendTo; } } // no match?? then alignments are mis-specified. if (!gotAMatch) { Log.errorln("Cant align axes, axis has align attribute that is mis-specified. Aborting."); return arrayToAppendTo; } } // 2. "Append" axis values to original axis. Because // there are 2 different ways to add in data we either // have a pre-existing axis value, in which case we dont // need to expand the existing axis, or there is no pre-existing // value so we tack it in. We need to figure out here if an // axis value already exists, and if it doesnt then we add it in. // Iterator iter3 = origAxisList.iterator(); while (iter3.hasNext()) { AxisInterface origAxis = (AxisInterface) iter3.next(); AxisInterface addAxis = (AxisInterface) correspondingAddAxis.get(origAxis.getAxisId()); if (addAxis instanceof Axis && origAxis instanceof Axis) { List valuesToAdd = ((Axis) addAxis).getAxisValues(); Iterator iter4 = valuesToAdd.iterator(); while (iter4.hasNext()) { Value value = (Value) iter4.next(); if (((Axis) origAxis).getIndexFromAxisValue(value) == -1) { ((Axis) origAxis).addAxisValue(value); } } } else if (addAxis instanceof FieldAxis && origAxis instanceof FieldAxis) { // both are fieldAxis Log.errorln("Dont know how to merge field Axis data. Aborting."); System.exit(-1); } else { // mixed class Axes?? (e.g. a fieldAxis id matches Axis id??!? Error!!) Log.errorln("Dont know how to merge data. Aborting."); System.exit(-1); } } // 3. Append data from one array to the other appropriately Locator origLocator = arrayToAppendTo.createLocator(); Locator addLocator = arrayToAdd.createLocator(); while (addLocator.hasNext()) { try { // retrieve the data Object data = arrayToAdd.getData(addLocator); // set up the origLocator List locatorAxisList = addLocator.getIterationOrder(); Iterator iter5 = locatorAxisList.iterator(); Log.debug("Appending data to array("); while (iter5.hasNext()) { Axis addAxis = (Axis) iter5.next(); Value thisAxisValue = addLocator.getAxisValue(addAxis); Axis thisAxis = (Axis) correspondingOrigAxis.get(addAxis.getAxisId()); try { origLocator.setAxisIndexByAxisValue(thisAxis, thisAxisValue); Log.debug(origLocator.getAxisIndex(thisAxis)+","); } catch (AxisLocationOutOfBoundsException e) { Log.errorln("Weird axis out of bounds error for append array."); } } // add in the data as appropriate. Log.debugln(") => ["+data.toString()+"]"); try { if (data instanceof Double) arrayToAppendTo.setData(origLocator, (Double) data); else if (data instanceof Integer) arrayToAppendTo.setData(origLocator, (Integer) data); else if (data instanceof String ) arrayToAppendTo.setData(origLocator, (String) data); else Log.errorln("Cant understand class of data !(Double|Integer|String). ignoring append"); } catch (SetDataException e) { Log.errorln("Cant setData. Ignoring append"); } } catch (NoDataException e) { // do nothing for NoDataValues?? } addLocator.next(); // go to next location } } else Log.errorln("Cannot append to null array. Ignoring request."); return arrayToAppendTo; }
13,726
public Array getCurrentArray () { return CurrentArray; }
public ArrayInterface getCurrentArray () { return CurrentArray; }
13,727
public Structure getCurrentStructure () { return CurrentStructure; }
public StructureInterface getCurrentStructure () { return CurrentStructure; }
13,728
private void init () { // set up logging, needed ?? Log.configure("XDFLogConfig"); // assign/init 'globals' (e.g. object fields) XDF = new Structure(); Options = new Hashtable(); startElementHandlerHashtable = new Hashtable(); // start node handler charDataHandlerHashtable = new Hashtable(); // charData handler endElementHandlerHashtable = new Hashtable(); // end node handler // initialize the default XDF parser dispatch tables initStartHandlerHashtable(); initCharDataHandlerHashtable(); initEndHandlerHashtable(); }
private void init () { // set up logging, needed ?? Log.configure("XDFLogConfig"); // assign/init 'globals' (e.g. object fields) XDF = new XDF(); Options = new Hashtable(); startElementHandlerHashtable = new Hashtable(); // start node handler charDataHandlerHashtable = new Hashtable(); // charData handler endElementHandlerHashtable = new Hashtable(); // end node handler // initialize the default XDF parser dispatch tables initStartHandlerHashtable(); initCharDataHandlerHashtable(); initEndHandlerHashtable(); }
13,729
public void setCurrentArray(Array array) { CurrentArray = array; }
private void setCurrentArray(ArrayInterface array) { CurrentArray = array; }
13,730
public void setCurrentDatatypeObject(Object object) { CurrentDatatypeObject = object; }
private void setCurrentDatatypeObject(Object object) { CurrentDatatypeObject = object; }
13,731
public void setCurrentStructure (Structure structure) { CurrentStructure = structure; }
private void setCurrentStructure (StructureInterface structure) { CurrentStructure = structure; }
13,732
public GnuRSAPublicKey(final BigInteger n, final BigInteger e) { // super(n); super(n, e); // // this.e = e; }
public GnuRSAPublicKey(final BigInteger n, final BigInteger e) { // super(n); this(Registry.RAW_ENCODING_ID, n, e); // // this.e = e; }
13,733
public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; // return super.equals(that) && e.equals(that.getPublicExponent()); return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); }
publicbooleanequals(finalObjectobj){if(obj==null){returnfalse;}if(!(objinstanceofRSAPublicKey)){returnfalse;}finalRSAPublicKeythat=(RSAPublicKey)obj;//returnsuper.equals(that)&&e.equals(that.getPublicExponent());returnsuper.equals(that)&&getPublicExponent().equals(that.getPublicExponent());}
13,734
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePublicKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePublicKey(this); break; default: throw new IllegalArgumentException("Unsupported encoding format: " + format); } return result; }
13,735
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
13,736
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
13,737
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } catch (IllegalArgumentException ignored) { throw new IllegalArgumentException("magic"); } }
13,738
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { } }
13,739
public long skip(long n) throws IOException { if (n < 0) throw new IllegalArgumentException(); int len = 2048; if (n < len) len = (int) n; byte[] tmp = new byte[len]; return (long) read(tmp); }
public long skip(long n) throws IOException { if (n < 0) throw new IllegalArgumentException(); int len = 2048; if (n < len) len = (int) n; byte[] tmp = new byte[len]; return (long) read(tmp); }
13,743
public void dump (byte[] abyte0) { try { System.out.print("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { System.out.println("Cannot dump from host\n\r"); } }
public void dump (byte[] abyte0) { try { log.info("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { System.out.println("Cannot dump from host\n\r"); } }
13,744
public void dump (byte[] abyte0) { try { System.out.print("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { System.out.println("Cannot dump from host\n\r"); } }
public void dump (byte[] abyte0) { try { System.out.print("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { log.warn("Cannot dump from host\n\r"); } }
13,745
private final void loadStream(byte abyte0[], int i) throws IOException { int j = 0; int size = 0; if (saveStream == null) { j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff; size = abyte0.length; } else { size = saveStream.length + abyte0.length; byte[] inter = new byte[size]; System.arraycopy(saveStream, 0, inter, 0, saveStream.length); System.arraycopy(abyte0, 0, inter, saveStream.length, abyte0.length); abyte0 = new byte[size]; System.arraycopy(inter, 0, abyte0, 0, size); saveStream = null; inter = null; j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff;// System.out.println("partial stream found"); } if (j > size) { saveStream = new byte[abyte0.length]; System.arraycopy(abyte0, 0, saveStream, 0, abyte0.length);// System.out.println("partial stream saved"); } else { byte abyte1[]; try { abyte1 = new byte[j + 2]; System.arraycopy(abyte0, i, abyte1, 0, j + 2); dsq.put(new Stream5250(abyte1)); if(abyte0.length > abyte1.length + i) loadStream(abyte0, i + j + 2); } catch (Exception ex) { System.out.println("load stream error " + ex.getMessage()); // ex.printStackTrace(); // dump(abyte0); } } }
log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); privatelog.debug("partial stream found"); finallog.debug("partial stream found"); voidlog.debug("partial stream found"); loadStream(bytelog.debug("partial stream found"); abyte0[],log.debug("partial stream found"); intlog.debug("partial stream found"); i)log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); throwslog.debug("partial stream found"); IOExceptionlog.debug("partial stream found"); {log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); intlog.debug("partial stream found"); jlog.debug("partial stream found"); =log.debug("partial stream found"); 0;log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); intlog.debug("partial stream found"); sizelog.debug("partial stream found"); =log.debug("partial stream found"); 0;log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); iflog.debug("partial stream found"); (saveStreamlog.debug("partial stream found"); ==log.debug("partial stream found"); null)log.debug("partial stream found"); {log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); jlog.debug("partial stream found"); =log.debug("partial stream found"); (abyte0[i]log.debug("partial stream found"); &log.debug("partial stream found"); 0xff)log.debug("partial stream found"); <<log.debug("partial stream found"); 8log.debug("partial stream found"); |log.debug("partial stream found"); abyte0[ilog.debug("partial stream found"); +log.debug("partial stream found"); 1]log.debug("partial stream found"); &log.debug("partial stream found"); 0xff;log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); sizelog.debug("partial stream found"); =log.debug("partial stream found"); abyte0.length;log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); }log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); elselog.debug("partial stream found"); {log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); sizelog.debug("partial stream found"); =log.debug("partial stream found"); saveStream.lengthlog.debug("partial stream found"); +log.debug("partial stream found"); abyte0.length;log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); byte[]log.debug("partial stream found"); interlog.debug("partial stream found"); =log.debug("partial stream found"); newlog.debug("partial stream found"); byte[size];log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.arraycopy(saveStream,log.debug("partial stream found"); 0,log.debug("partial stream found"); inter,log.debug("partial stream found"); 0,log.debug("partial stream found"); saveStream.length);log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.arraycopy(abyte0,log.debug("partial stream found"); 0,log.debug("partial stream found"); inter,log.debug("partial stream found"); saveStream.length,log.debug("partial stream found"); abyte0.length);log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); abyte0log.debug("partial stream found"); =log.debug("partial stream found"); newlog.debug("partial stream found"); byte[size];log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.arraycopy(inter,log.debug("partial stream found"); 0,log.debug("partial stream found"); abyte0,log.debug("partial stream found"); 0,log.debug("partial stream found"); size);log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); saveStreamlog.debug("partial stream found"); =log.debug("partial stream found"); null;log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); interlog.debug("partial stream found"); =log.debug("partial stream found"); null;log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); jlog.debug("partial stream found"); =log.debug("partial stream found"); (abyte0[i]log.debug("partial stream found"); &log.debug("partial stream found"); 0xff)log.debug("partial stream found"); <<log.debug("partial stream found"); 8log.debug("partial stream found"); |log.debug("partial stream found"); abyte0[ilog.debug("partial stream found"); +log.debug("partial stream found"); 1]log.debug("partial stream found"); &log.debug("partial stream found"); 0xff;//log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.out.println("partiallog.debug("partial stream found"); streamlog.debug("partial stream found"); found");log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); }log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); iflog.debug("partial stream found"); (jlog.debug("partial stream found"); >log.debug("partial stream found"); size)log.debug("partial stream found"); {log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); saveStreamlog.debug("partial stream found"); =log.debug("partial stream found"); newlog.debug("partial stream found"); byte[abyte0.length];log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.arraycopy(abyte0,log.debug("partial stream found"); 0,log.debug("partial stream found"); saveStream,log.debug("partial stream found"); 0,log.debug("partial stream found"); abyte0.length);//log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.out.println("partiallog.debug("partial stream found"); streamlog.debug("partial stream found"); saved");log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); }log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); elselog.debug("partial stream found"); {log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); bytelog.debug("partial stream found"); abyte1[];log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); trylog.debug("partial stream found"); {log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); abyte1log.debug("partial stream found"); =log.debug("partial stream found"); newlog.debug("partial stream found"); byte[jlog.debug("partial stream found"); +log.debug("partial stream found"); 2];log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.arraycopy(abyte0,log.debug("partial stream found"); i,log.debug("partial stream found"); abyte1,log.debug("partial stream found"); 0,log.debug("partial stream found"); jlog.debug("partial stream found"); +log.debug("partial stream found"); 2);log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); dsq.put(newlog.debug("partial stream found"); Stream5250(abyte1));log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); if(abyte0.lengthlog.debug("partial stream found"); >log.debug("partial stream found"); abyte1.lengthlog.debug("partial stream found"); +log.debug("partial stream found"); i)log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); loadStream(abyte0,log.debug("partial stream found"); ilog.debug("partial stream found"); +log.debug("partial stream found"); jlog.debug("partial stream found"); +log.debug("partial stream found"); 2);log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); }log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); catchlog.debug("partial stream found"); (Exceptionlog.debug("partial stream found"); ex)log.debug("partial stream found"); {log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); System.out.println("loadlog.debug("partial stream found"); streamlog.debug("partial stream found"); errorlog.debug("partial stream found"); "log.debug("partial stream found"); +log.debug("partial stream found"); ex.getMessage());log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); //log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); ex.printStackTrace();log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); //log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); dump(abyte0);log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); }log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); }log.debug("partial stream found"); log.debug("partial stream found"); log.debug("partial stream found"); }
13,746
private final void loadStream(byte abyte0[], int i) throws IOException { int j = 0; int size = 0; if (saveStream == null) { j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff; size = abyte0.length; } else { size = saveStream.length + abyte0.length; byte[] inter = new byte[size]; System.arraycopy(saveStream, 0, inter, 0, saveStream.length); System.arraycopy(abyte0, 0, inter, saveStream.length, abyte0.length); abyte0 = new byte[size]; System.arraycopy(inter, 0, abyte0, 0, size); saveStream = null; inter = null; j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff;// System.out.println("partial stream found"); } if (j > size) { saveStream = new byte[abyte0.length]; System.arraycopy(abyte0, 0, saveStream, 0, abyte0.length);// System.out.println("partial stream saved"); } else { byte abyte1[]; try { abyte1 = new byte[j + 2]; System.arraycopy(abyte0, i, abyte1, 0, j + 2); dsq.put(new Stream5250(abyte1)); if(abyte0.length > abyte1.length + i) loadStream(abyte0, i + j + 2); } catch (Exception ex) { System.out.println("load stream error " + ex.getMessage()); // ex.printStackTrace(); // dump(abyte0); } } }
log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); privatelog.debug("partial stream saved"); finallog.debug("partial stream saved"); voidlog.debug("partial stream saved"); loadStream(bytelog.debug("partial stream saved"); abyte0[],log.debug("partial stream saved"); intlog.debug("partial stream saved"); i)log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); throwslog.debug("partial stream saved"); IOExceptionlog.debug("partial stream saved"); {log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); intlog.debug("partial stream saved"); jlog.debug("partial stream saved"); =log.debug("partial stream saved"); 0;log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); intlog.debug("partial stream saved"); sizelog.debug("partial stream saved"); =log.debug("partial stream saved"); 0;log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); iflog.debug("partial stream saved"); (saveStreamlog.debug("partial stream saved"); ==log.debug("partial stream saved"); null)log.debug("partial stream saved"); {log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); jlog.debug("partial stream saved"); =log.debug("partial stream saved"); (abyte0[i]log.debug("partial stream saved"); &log.debug("partial stream saved"); 0xff)log.debug("partial stream saved"); <<log.debug("partial stream saved"); 8log.debug("partial stream saved"); |log.debug("partial stream saved"); abyte0[ilog.debug("partial stream saved"); +log.debug("partial stream saved"); 1]log.debug("partial stream saved"); &log.debug("partial stream saved"); 0xff;log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); sizelog.debug("partial stream saved"); =log.debug("partial stream saved"); abyte0.length;log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); }log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); elselog.debug("partial stream saved"); {log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); sizelog.debug("partial stream saved"); =log.debug("partial stream saved"); saveStream.lengthlog.debug("partial stream saved"); +log.debug("partial stream saved"); abyte0.length;log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); byte[]log.debug("partial stream saved"); interlog.debug("partial stream saved"); =log.debug("partial stream saved"); newlog.debug("partial stream saved"); byte[size];log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.arraycopy(saveStream,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); inter,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); saveStream.length);log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.arraycopy(abyte0,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); inter,log.debug("partial stream saved"); saveStream.length,log.debug("partial stream saved"); abyte0.length);log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); abyte0log.debug("partial stream saved"); =log.debug("partial stream saved"); newlog.debug("partial stream saved"); byte[size];log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.arraycopy(inter,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); abyte0,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); size);log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); saveStreamlog.debug("partial stream saved"); =log.debug("partial stream saved"); null;log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); interlog.debug("partial stream saved"); =log.debug("partial stream saved"); null;log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); jlog.debug("partial stream saved"); =log.debug("partial stream saved"); (abyte0[i]log.debug("partial stream saved"); &log.debug("partial stream saved"); 0xff)log.debug("partial stream saved"); <<log.debug("partial stream saved"); 8log.debug("partial stream saved"); |log.debug("partial stream saved"); abyte0[ilog.debug("partial stream saved"); +log.debug("partial stream saved"); 1]log.debug("partial stream saved"); &log.debug("partial stream saved"); 0xff;//log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.out.println("partiallog.debug("partial stream saved"); streamlog.debug("partial stream saved"); found");log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); }log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); iflog.debug("partial stream saved"); (jlog.debug("partial stream saved"); >log.debug("partial stream saved"); size)log.debug("partial stream saved"); {log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); saveStreamlog.debug("partial stream saved"); =log.debug("partial stream saved"); newlog.debug("partial stream saved"); byte[abyte0.length];log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.arraycopy(abyte0,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); saveStream,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); abyte0.length);//log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.out.println("partiallog.debug("partial stream saved"); streamlog.debug("partial stream saved"); saved");log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); }log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); elselog.debug("partial stream saved"); {log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); bytelog.debug("partial stream saved"); abyte1[];log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); trylog.debug("partial stream saved"); {log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); abyte1log.debug("partial stream saved"); =log.debug("partial stream saved"); newlog.debug("partial stream saved"); byte[jlog.debug("partial stream saved"); +log.debug("partial stream saved"); 2];log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.arraycopy(abyte0,log.debug("partial stream saved"); i,log.debug("partial stream saved"); abyte1,log.debug("partial stream saved"); 0,log.debug("partial stream saved"); jlog.debug("partial stream saved"); +log.debug("partial stream saved"); 2);log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); dsq.put(newlog.debug("partial stream saved"); Stream5250(abyte1));log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); if(abyte0.lengthlog.debug("partial stream saved"); >log.debug("partial stream saved"); abyte1.lengthlog.debug("partial stream saved"); +log.debug("partial stream saved"); i)log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); loadStream(abyte0,log.debug("partial stream saved"); ilog.debug("partial stream saved"); +log.debug("partial stream saved"); jlog.debug("partial stream saved"); +log.debug("partial stream saved"); 2);log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); }log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); catchlog.debug("partial stream saved"); (Exceptionlog.debug("partial stream saved"); ex)log.debug("partial stream saved"); {log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); System.out.println("loadlog.debug("partial stream saved"); streamlog.debug("partial stream saved"); errorlog.debug("partial stream saved"); "log.debug("partial stream saved"); +log.debug("partial stream saved"); ex.getMessage());log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); //log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); ex.printStackTrace();log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); //log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); dump(abyte0);log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); }log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); }log.debug("partial stream saved"); log.debug("partial stream saved"); log.debug("partial stream saved"); }
13,747
private final void loadStream(byte abyte0[], int i) throws IOException { int j = 0; int size = 0; if (saveStream == null) { j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff; size = abyte0.length; } else { size = saveStream.length + abyte0.length; byte[] inter = new byte[size]; System.arraycopy(saveStream, 0, inter, 0, saveStream.length); System.arraycopy(abyte0, 0, inter, saveStream.length, abyte0.length); abyte0 = new byte[size]; System.arraycopy(inter, 0, abyte0, 0, size); saveStream = null; inter = null; j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff;// System.out.println("partial stream found"); } if (j > size) { saveStream = new byte[abyte0.length]; System.arraycopy(abyte0, 0, saveStream, 0, abyte0.length);// System.out.println("partial stream saved"); } else { byte abyte1[]; try { abyte1 = new byte[j + 2]; System.arraycopy(abyte0, i, abyte1, 0, j + 2); dsq.put(new Stream5250(abyte1)); if(abyte0.length > abyte1.length + i) loadStream(abyte0, i + j + 2); } catch (Exception ex) { System.out.println("load stream error " + ex.getMessage()); // ex.printStackTrace(); // dump(abyte0); } } }
private final void loadStream(byte abyte0[], int i) throws IOException { int j = 0; int size = 0; if (saveStream == null) { j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff; size = abyte0.length; } else { size = saveStream.length + abyte0.length; byte[] inter = new byte[size]; System.arraycopy(saveStream, 0, inter, 0, saveStream.length); System.arraycopy(abyte0, 0, inter, saveStream.length, abyte0.length); abyte0 = new byte[size]; System.arraycopy(inter, 0, abyte0, 0, size); saveStream = null; inter = null; j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff;// System.out.println("partial stream found"); } if (j > size) { saveStream = new byte[abyte0.length]; System.arraycopy(abyte0, 0, saveStream, 0, abyte0.length);// System.out.println("partial stream saved"); } else { byte abyte1[]; try { abyte1 = new byte[j + 2]; System.arraycopy(abyte0, i, abyte1, 0, j + 2); dsq.put(new Stream5250(abyte1)); if(abyte0.length > abyte1.length + i) loadStream(abyte0, i + j + 2); } catch (Exception ex) { log.warn("load stream error " + ex.getMessage()); // ex.printStackTrace(); // dump(abyte0); } } }
13,748
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { log.warn(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
13,749
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); log.warn(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
13,750
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); publiclog.warn(ioe.getMessage()); finallog.warn(ioe.getMessage()); voidlog.warn(ioe.getMessage()); run()log.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); booleanlog.warn(ioe.getMessage()); donelog.warn(ioe.getMessage()); =log.warn(ioe.getMessage()); false;log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); melog.warn(ioe.getMessage()); =log.warn(ioe.getMessage()); Thread.currentThread();log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); loadlog.warn(ioe.getMessage()); thelog.warn(ioe.getMessage()); firstlog.warn(ioe.getMessage()); responselog.warn(ioe.getMessage()); screenlog.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); trylog.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); loadStream(abyte2,log.warn(ioe.getMessage()); 0);log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); catchlog.warn(ioe.getMessage()); (IOExceptionlog.warn(ioe.getMessage()); ioef)log.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); System.out.println("log.warn(ioe.getMessage()); run()log.warn(ioe.getMessage()); "log.warn(ioe.getMessage()); +log.warn(ioe.getMessage()); ioef.getMessage());log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); whilelog.warn(ioe.getMessage()); (!done)log.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); trylog.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); byte[]log.warn(ioe.getMessage()); abyte0log.warn(ioe.getMessage()); =log.warn(ioe.getMessage()); readIncoming();log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); WVLlog.warn(ioe.getMessage()); -log.warn(ioe.getMessage()); LDClog.warn(ioe.getMessage()); :log.warn(ioe.getMessage()); 16/07/2003log.warn(ioe.getMessage()); :log.warn(ioe.getMessage()); TR.000345log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); Whenlog.warn(ioe.getMessage()); thelog.warn(ioe.getMessage()); socketlog.warn(ioe.getMessage()); haslog.warn(ioe.getMessage()); beenlog.warn(ioe.getMessage()); closed,log.warn(ioe.getMessage()); thelog.warn(ioe.getMessage()); readinglog.warn(ioe.getMessage()); returnslog.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); nolog.warn(ioe.getMessage()); byteslog.warn(ioe.getMessage()); (anlog.warn(ioe.getMessage()); emptylog.warn(ioe.getMessage()); bytelog.warn(ioe.getMessage()); arrray).log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); Butlog.warn(ioe.getMessage()); thelog.warn(ioe.getMessage()); loadStreamlog.warn(ioe.getMessage()); failslog.warn(ioe.getMessage()); onlog.warn(ioe.getMessage()); this,log.warn(ioe.getMessage()); solog.warn(ioe.getMessage()); welog.warn(ioe.getMessage()); checklog.warn(ioe.getMessage()); itlog.warn(ioe.getMessage()); here!log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); iflog.warn(ioe.getMessage()); (abyte0.lengthlog.warn(ioe.getMessage()); >log.warn(ioe.getMessage()); 0)log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); loadStream(abyte0,log.warn(ioe.getMessage()); 0);log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); WVLlog.warn(ioe.getMessage()); -log.warn(ioe.getMessage()); LDClog.warn(ioe.getMessage()); :log.warn(ioe.getMessage()); 16/07/2003log.warn(ioe.getMessage()); :log.warn(ioe.getMessage()); TR.000345log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); Returninglog.warn(ioe.getMessage()); nolog.warn(ioe.getMessage()); byteslog.warn(ioe.getMessage()); meanslog.warn(ioe.getMessage()); thelog.warn(ioe.getMessage()); inputlog.warn(ioe.getMessage()); bufferlog.warn(ioe.getMessage()); haslog.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); //log.warn(ioe.getMessage()); reachedlog.warn(ioe.getMessage()); end-of-stream,log.warn(ioe.getMessage()); solog.warn(ioe.getMessage()); welog.warn(ioe.getMessage()); dolog.warn(ioe.getMessage()); alog.warn(ioe.getMessage()); disconnect!log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); elselog.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); donelog.warn(ioe.getMessage()); =log.warn(ioe.getMessage()); true;log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); vt.disconnect();log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); catchlog.warn(ioe.getMessage()); (SocketExceptionlog.warn(ioe.getMessage()); se)log.warn(ioe.getMessage()); {//log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); System.out.println("log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); DataStreamProducerlog.warn(ioe.getMessage()); threadlog.warn(ioe.getMessage()); interruptedlog.warn(ioe.getMessage()); andlog.warn(ioe.getMessage()); stoppinglog.warn(ioe.getMessage()); "log.warn(ioe.getMessage()); +log.warn(ioe.getMessage()); se.getMessage());log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); System.out.println("log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); DataStreamProducerlog.warn(ioe.getMessage()); threadlog.warn(ioe.getMessage()); interruptedlog.warn(ioe.getMessage()); andlog.warn(ioe.getMessage()); stoppinglog.warn(ioe.getMessage()); ");log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); donelog.warn(ioe.getMessage()); =log.warn(ioe.getMessage()); true;log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); catchlog.warn(ioe.getMessage()); (IOExceptionlog.warn(ioe.getMessage()); ioe)log.warn(ioe.getMessage()); {//log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); System.out.println(ioe.getMessage());log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); iflog.warn(ioe.getMessage()); (me.isInterrupted())log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); donelog.warn(ioe.getMessage()); =log.warn(ioe.getMessage()); true;log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); catchlog.warn(ioe.getMessage()); (Exceptionlog.warn(ioe.getMessage()); ex)log.warn(ioe.getMessage()); {log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); System.out.println(ex.getMessage());log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); iflog.warn(ioe.getMessage()); (me.isInterrupted())log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); donelog.warn(ioe.getMessage()); =log.warn(ioe.getMessage()); true;log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); log.warn(ioe.getMessage()); }
13,751
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { log.warn(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
13,752
public void run() { Socket socket = null; DataInputStream datainputstream = null; String localFileFull = localFileF; executeCommand("TYPE","I"); try { socket = createPassiveSocket("RETR " + remoteFileF); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); writeHeader(localFileFull); byte abyte0[] = new byte[recordLength]; StringBuffer rb = new StringBuffer(recordOutLength); int c = 0; int kj = 0; int len = 0; for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == recordLength) { rb.setLength(0); parseFFD(abyte0,rb); len =0; status.setCurrentRecord(c / recordLength); fireStatusEvent(); } getThread.yield(); // if ((c / recordLength) == 200) // aborted = true; } System.out.println(c); if (c == 0) { status.setCurrentRecord(c); fireStatusEvent(); } else { if (!aborted) parseResponse(); } writeFooter();// parseResponse(); printFTPInfo("Transfer complete!"); } } catch(InterruptedIOException iioe) { printFTPInfo("Interrupted! " + iioe.getMessage()); } catch(Exception _ex) { printFTPInfo("Error! " + _ex); } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } try { writeFooter(); } catch(Exception _ex) { } disconnect(); } }
public void run() { Socket socket = null; DataInputStream datainputstream = null; String localFileFull = localFileF; executeCommand("TYPE","I"); try { socket = createPassiveSocket("RETR " + remoteFileF); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); writeHeader(localFileFull); byte abyte0[] = new byte[recordLength]; StringBuffer rb = new StringBuffer(recordOutLength); int c = 0; int kj = 0; int len = 0; for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == recordLength) { rb.setLength(0); parseFFD(abyte0,rb); len =0; status.setCurrentRecord(c / recordLength); fireStatusEvent(); } Thread.yield(); // if ((c / recordLength) == 200) // aborted = true; } System.out.println(c); if (c == 0) { status.setCurrentRecord(c); fireStatusEvent(); } else { if (!aborted) parseResponse(); } writeFooter();// parseResponse(); printFTPInfo("Transfer complete!"); } } catch(InterruptedIOException iioe) { printFTPInfo("Interrupted! " + iioe.getMessage()); } catch(Exception _ex) { printFTPInfo("Error! " + _ex); } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } try { writeFooter(); } catch(Exception _ex) { } disconnect(); } }
13,753
public StackManagerImpl(X86RegisterPool pool) { this.pool = pool; }
public StackManagerImpl(X86RegisterPool pool) { this.pool = pool; }
13,754
public void writePUSH(int jvmType, Register reg) { final Item item = WordItem.createReg(jvmType, reg); Item.assertCondition(pool.request(reg, item), "request"); push(item); }
public void writePUSH(int jvmType, Register reg) { final Item item = WordItem.createReg(jvmType, reg); Item.assertCondition(pool.request(reg, item), "request"); push(item); }
13,756
public void writePUSH64(int jvmType, Register lsbReg, Register msbReg) { final Item item; switch (jvmType) { case JvmType.LONG: item = LongItem.createReg(lsbReg, msbReg); break; case JvmType.DOUBLE: item = DoubleItem.createReg(lsbReg, msbReg); break; default: throw new IllegalArgumentException("Unknown JvmType " + jvmType); } Item.assertCondition(pool.request(lsbReg, item), "request-lsb"); Item.assertCondition(pool.request(msbReg, item), "request-msb"); push(item); }
public void writePUSH64(int jvmType, Register lsbReg, Register msbReg) { final Item item; switch (jvmType) { case JvmType.LONG: item = LongItem.createReg(lsbReg, msbReg); break; case JvmType.DOUBLE: item = DoubleItem.createReg(lsbReg, msbReg); break; default: throw new IllegalArgumentException("Unknown JvmType " + jvmType); } Item.assertCondition(pool.request(lsbReg, item), "request-lsb"); Item.assertCondition(pool.request(msbReg, item), "request-msb"); push(item); }
13,757
final AbstractX86StackManager createStackMgr(X86RegisterPool pool) { return new StackManagerImpl(pool); }
final AbstractX86StackManager createStackMgr(X86RegisterPool pool) { return new StackManagerImpl(pool); }
13,758
final void pushAll(TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = VirtualStack.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
final void pushAll(TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = VirtualStack.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
13,759
final void pushAll(TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = VirtualStack.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
final void pushAll(TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = VirtualStack.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
13,760
public String getUIClassID() { return uiClassID; }
public String getUIClassID() { return "ComboBoxUI"; }
13,762
public void setEditable(boolean editable) { if (isEditable != editable) { isEditable = editable; firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable); } }
public void setEditable(boolean editable) { if (isEditable != editable) { isEditable = editable; firePropertyChange("editable", ! isEditable, isEditable); } }
13,763
public void setEditor(ComboBoxEditor newEditor) { if (editor == newEditor) return; if (editor != null) editor.removeActionListener(this); ComboBoxEditor oldEditor = editor; editor = newEditor; if (editor != null) editor.addActionListener(this); firePropertyChange(EDITOR_CHANGED_PROPERTY, oldEditor, editor); }
public void setEditor(ComboBoxEditor newEditor) { if (editor == newEditor) return; if (editor != null) editor.removeActionListener(this); ComboBoxEditor oldEditor = editor; editor = newEditor; if (editor != null) editor.addActionListener(this); firePropertyChange("editor", oldEditor, editor); }
13,764
public void setEnabled(boolean enabled) { boolean oldEnabled = super.isEnabled(); if (enabled != oldEnabled) { super.setEnabled(enabled); firePropertyChange(ENABLED_CHANGED_PROPERTY, oldEnabled, (boolean) enabled); } }
public void setEnabled(boolean enabled) { boolean oldEnabled = super.isEnabled(); if (enabled != oldEnabled) { super.setEnabled(enabled); firePropertyChange(ENABLED_CHANGED_PROPERTY, oldEnabled, (boolean) enabled); } }
13,765
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = maximumRowCount; maximumRowCount = rowCount; firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY, oldMaximumRowCount, maximumRowCount); } }
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = maximumRowCount; maximumRowCount = rowCount; firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY, oldMaximumRowCount, maximumRowCount); } }
13,766
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if(dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange(MODEL_CHANGED_PROPERTY, oldDataModel, dataModel); }
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if(dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange("model", oldDataModel, dataModel); }
13,767
public void setRenderer(ListCellRenderer aRenderer) { if (renderer != aRenderer) { ListCellRenderer oldRenderer = renderer; renderer = aRenderer; firePropertyChange(RENDERER_CHANGED_PROPERTY, oldRenderer, renderer); } }
public void setRenderer(ListCellRenderer aRenderer) { if (renderer != aRenderer) { ListCellRenderer oldRenderer = renderer; renderer = aRenderer; firePropertyChange(RENDERER_CHANGED_PROPERTY, oldRenderer, renderer); } }
13,768
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final String state = " (" + Unsafe.getCurrentProcessor().getCurrentThread().getReadableErrorState() + ")"; switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final String state = " (" + Unsafe.getCurrentProcessor().getCurrentThread().getReadableErrorState() + ")"; switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
13,769
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final String state = " (" + Unsafe.getCurrentProcessor().getCurrentThread().getReadableErrorState() + ")"; switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final String state = " (" + Unsafe.getCurrentProcessor().getCurrentThread().getReadableErrorState() + ")"; switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
13,770
protected AccessibleObject() { }
protected AccessibleObject() { }
13,771
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
13,772
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
13,773
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
13,774
public boolean isAccessible() { return flag; }
public boolean isAccessible() { return flag; }
13,775
protected void resolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.add(this); } }
protected void resolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.add(this); } }
13,777
protected void unresolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.remove(this); } }
protected void unresolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.remove(this); } }
13,778
public final void visit_getstatic(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final int type = JvmType.SignatureToType(fieldRef.getSignature()); final VmStaticField sf = (VmStaticField) fieldRef.getResolvedVmField(); // Initialize if needed if (!sf.getDeclaringClass().isInitialized()) { final X86RegisterPool pool = eContext.getGPRPool(); final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.INT, false); writeInitializeClass(fieldRef, tmp); pool.release(tmp); } // Get static field object if (JvmType.isFloat(type)) { final boolean is32bit = !fieldRef.isWide(); if (sf.isShared()) { helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmSharedStaticsEntry)sf, is32bit); } else { final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.REFERENCE, false); helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmIsolatedStaticsEntry) sf, is32bit, tmp); L1AHelper.releaseRegister(eContext, tmp); } final Item result = ifac.createFPUStack(type); vstack.fpuStack.push(result); vstack.push(result); } else if (!fieldRef.isWide()) { final WordItem result = L1AHelper.requestWordRegister(eContext, type, false); final GPR resultr = result.getRegister(); if (os.isCode32() || (type != JvmType.REFERENCE)) { if (sf.isShared()) { helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmIsolatedStaticsEntry)sf); } } else { if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } else { final DoubleWordItem result = L1AHelper.requestDoubleWordRegisters( eContext, type); if (os.isCode32()) { final GPR lsb = result.getLsbRegister(eContext); final GPR msb = result.getMsbRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmIsolatedStaticsEntry)sf); } } else { final GPR64 reg = result.getRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } }
public final void visit_getstatic(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final int type = JvmType.SignatureToType(fieldRef.getSignature()); final VmStaticField sf = (VmStaticField) fieldRef.getResolvedVmField(); // Initialize if needed if (!sf.getDeclaringClass().isInitialized()) { final X86RegisterPool pool = eContext.getGPRPool(); final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.INT, false); writeInitializeClass(fieldRef, tmp); pool.release(tmp); } // Get static field object if (JvmType.isFloat(type)) { final boolean is32bit = !fieldRef.isWide(); if (sf.isShared()) { helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmSharedStaticsEntry)sf, is32bit); } else { final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.REFERENCE, false); helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmIsolatedStaticsEntry) sf, is32bit, tmp); L1AHelper.releaseRegister(eContext, tmp); } final Item result = ifac.createFPUStack(type); vstack.fpuStack.push(result); vstack.push(result); } else if (!fieldRef.isWide()) { final WordItem result = L1AHelper.requestWordRegister(eContext, type, false); final GPR resultr = result.getRegister(); if (os.isCode32() || (type != JvmType.REFERENCE)) { if (sf.isShared()) { helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmSharedStaticsEntry)sf); } else { final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.REFERENCE, false); helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmIsolatedStaticsEntry) sf, tmp); L1AHelper.releaseRegister(eContext, tmp); } } else { if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } else { final DoubleWordItem result = L1AHelper.requestDoubleWordRegisters( eContext, type); if (os.isCode32()) { final GPR lsb = result.getLsbRegister(eContext); final GPR msb = result.getMsbRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmIsolatedStaticsEntry)sf); } } else { final GPR64 reg = result.getRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } }
13,779
public FileLock tryLock (long position, long size, boolean shared) throws IOException { if (position < 0 || size < 0) throw new IllegalArgumentException (); if (!isOpen ()) throw new ClosedChannelException (); if (shared && (mode & READ) == 0) throw new NonReadableChannelException (); if (!shared && (mode & WRITE) == 0) throw new NonWritableChannelException (); boolean completed = false; try { begin(); lock(position, size, shared, true); completed = true; return new FileLockImpl(this, position, size, shared); } finally { end(completed); } }
public FileLock tryLock (long position, long size, boolean shared) throws IOException { if (position < 0 || size < 0) throw new IllegalArgumentException (); if (!isOpen ()) throw new ClosedChannelException (); if (shared && (mode & READ) == 0) throw new NonReadableChannelException (); if (!shared && (mode & WRITE) == 0) throw new NonWritableChannelException (); boolean completed = false; try { begin(); lock(position, size, shared, true); completed = true; return new FileLockImpl(this, position, size, shared); } finally { end(completed); } }
13,780
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { ArrayList axisIds = new ArrayList (); int numberOfAxes = 0; synchronized (parentArray) { List axisList = parentArray.getAxisList(); Iterator iter = axisList.iterator(); while(iter.hasNext()) { AxisInterface axis = (AxisInterface) iter.next(); if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); indent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); } writeOut(outputstream, "<for axisIdRef=\""+axis.getAxisId()+"\">"); numberOfAxes++; } } //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } // end formatCommandList sync // print out remaining for statements while(numberOfAxes-- > 0) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); // peel off some indent indent = indent.substring(0,indent.length() - Specification.getInstance().getPrettyXDFOutputIndentation().length()); writeOut(outputstream, indent); } writeOut(outputstream, "</for>"); } }
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { ArrayList axisIds = new ArrayList (); int numberOfAxes = 0; synchronized (parentArray) { List axisList = parentArray.getAxisList(); Iterator iter = axisList.iterator(); while(iter.hasNext()) { AxisInterface axis = (AxisInterface) iter.next(); if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); indent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); } writeOut(outputstream, "<for axisIdRef=\""); writeOutAttribute(outputstream, axis.getAxisId()); writeOut(outputstream, "\">"); numberOfAxes++; } } //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } // end formatCommandList sync // print out remaining for statements while(numberOfAxes-- > 0) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); // peel off some indent indent = indent.substring(0,indent.length() - Specification.getInstance().getPrettyXDFOutputIndentation().length()); writeOut(outputstream, indent); } writeOut(outputstream, "</for>"); } }
13,781
public int columnAtPoint(Point point) { int x0 = getLocation().x; int ncols = getColumnCount(); Dimension gap = getIntercellSpacing(); TableColumnModel cols = getColumnModel(); int x = point.x; for (int i = 0; i < ncols; ++i) { int width = cols.getColumn(i).getWidth() + (gap == null ? 0 : gap.width); if (0 <= x && x < width) return i; x -= width; } return -1; }
public int columnAtPoint(Point point) { int x0 = getLocation().x; int ncols = getColumnCount(); Dimension gap = getIntercellSpacing(); TableColumnModel cols = getColumnModel(); int x = point.x; for (int i = 0; i < ncols; ++i) { int width = cols.getColumn(i).getWidth() + (gap == null ? 0 : gap.width); if (0 <= x && x < width) return i; x -= width; } return -1; }
13,783
public int columnAtPoint(Point point) { int x0 = getLocation().x; int ncols = getColumnCount(); Dimension gap = getIntercellSpacing(); TableColumnModel cols = getColumnModel(); int x = point.x; for (int i = 0; i < ncols; ++i) { int width = cols.getColumn(i).getWidth() + (gap == null ? 0 : gap.width); if (0 <= x && x < width) return i; x -= width; } return -1; }
} } public} int} columnAtPoint(Point} point)} } {} } } } int} x0} =} getLocation().x;} } } } int} ncols} =} getColumnCount();} } } } Dimension} gap} =} getIntercellSpacing();} } } } TableColumnModel} cols} =} getColumnModel();} } } } int} x} =} point.x;} } } } } } } } for} (int} i} =} 0;} i} <} ncols;} ++i)} } } } } } {} } } } } } } } int} width} =} cols.getColumn(i).getWidth()} +} (gap} ==} null} ?} 0} :} gap.width);} } } } } } } } if} (0} <=} x} &&} x} <} width)} } } } } } } } } } return} i;} } } } } } } } x} -=} width;} } } } } } } } }} } } } } } } } return} -1;} } }
13,784
public int rowAtPoint(Point point) { int y0 = getLocation().y; int nrows = getRowCount(); Dimension gap = getIntercellSpacing(); int height = getRowHeight() + (gap == null ? 0 : gap.height); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } return -1; }
} } public} int} rowAtPoint(Point} point)} } {} } } } int} y0} =} getLocation().y;} } } } int} nrows} =} getRowCount();} } } } Dimension} gap} =} getIntercellSpacing();} } } } int} height} =} getRowHeight()} +} (gap} ==} null} ?} 0} :} gap.height);} } } } int} y} =} point.y;} } } } } } } } for} (int} i} =} 0;} i} <} nrows;} ++i)} } } } } } {} } } } } } } } if} (0} <=} y} &&} y} <} height)} } } } } } } } } } return} i;} } } } } } } } y} -=} height;} } } } } } }} } } } } } } } } } return} -1;} } }
13,787
public void setRowHeight(int r) { if (rowHeight < 1) throw new IllegalArgumentException(); rowHeight = r; revalidate(); repaint(); }
public void setRowHeight(int r) { if (r < 1) throw new IllegalArgumentException(); rowHeight = r; revalidate(); repaint(); }
13,788
private void closeDialog() { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).dispose(); }
void closeDialog() { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).dispose(); }
13,791
private void filterEntries() { FileFilter[] list = filechooser.getChoosableFileFilters(); if (filters.getItemCount() > 0) filters.removeAllItems(); int index = -1; String selected = filechooser.getFileFilter().getDescription(); for (int i = 0; i < list.length; i++) { if (selected.equals(list[i].getDescription())) index = i; filters.addItem(list[i].getDescription()); } filters.setSelectedIndex(index); filters.revalidate(); filters.repaint(); }
void filterEntries() { FileFilter[] list = filechooser.getChoosableFileFilters(); if (filters.getItemCount() > 0) filters.removeAllItems(); int index = -1; String selected = filechooser.getFileFilter().getDescription(); for (int i = 0; i < list.length; i++) { if (selected.equals(list[i].getDescription())) index = i; filters.addItem(list[i].getDescription()); } filters.setSelectedIndex(index); filters.revalidate(); filters.repaint(); }
13,792
private void createFracture(ElementSpec[] data) { BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element child = paragraph.getElement(index); Edit edit = getEditForParagraphAndIndex(paragraph, index); AttributeSet atts = data[0].getAttributes(); if (offset != 0) { Element newEl1 = createLeafElement(paragraph, atts, child.getStartOffset(), offset); edit.addAddedElement(newEl1); edit.addRemovedElement(child); } }
private void createFracture(ElementSpec[] data) { BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element child = paragraph.getElement(index); Edit edit = getEditForParagraphAndIndex(paragraph, index); AttributeSet atts = child.getAttributes(); if (offset != 0) { Element newEl1 = createLeafElement(paragraph, atts, child.getStartOffset(), offset); edit.addAddedElement(newEl1); edit.addRemovedElement(child); } }
13,793
public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.pos = offset; this.endOffset = offset + length; this.length = length; documentEvent = ev; edits.removeAllElements(); elementStack.removeAllElements(); lastFractured = null; fracNotCreated = false; insertUpdate(data); // This for loop applies all the changes that were made and updates the // DocumentEvent. int size = edits.size(); for (int i = 0; i < size; i++) { Edit curr = (Edit) edits.get(i); BranchElement e = (BranchElement) curr.e; Element[] removed = curr.getRemovedElements(); Element[] added = curr.getAddedElements(); // FIXME: We probably shouldn't create the empty Element[] in the // first place. if (removed.length > 0 || added.length > 0) { if (curr.index + removed.length <= e.getElementCount()) { e.replace(curr.index, removed.length, added); ElementEdit ee = new ElementEdit(e, curr.index, removed, added); ev.addEdit(ee); } else { System.err.println("WARNING: Tried to replace elements "); System.err.print("beyond boundaries: elementCount: "); System.err.println(e.getElementCount()); System.err.print("index: " + curr.index); System.err.println(", removed.length: " + removed.length); } } } }
publicvoidinsert(intoffset,intlength,ElementSpec[]data,DefaultDocumentEventev){if(length==0)return;this.offset=offset;this.pos=offset;this.endOffset=offset+length;this.length=length;documentEvent=ev;edits.removeAllElements();elementStack.removeAllElements();lastFractured=null;fracNotCreated=false;insertUpdate(data);//Thisforloopappliesallthechangesthatweremadeandupdatesthe//DocumentEvent.intsize=edits.size();for(inti=0;i<size;i++){Editcurr=(Edit)edits.get(i);BranchElemente=(BranchElement)curr.e;Element[]removed=curr.getRemovedElements();Element[]added=curr.getAddedElements();//FIXME:Weprobablyshouldn'tcreatetheemptyElement[]inthe//firstplace.if(removed.length>0||added.length>0){if(curr.index+removed.length<=e.getElementCount()){e.replace(curr.index,removed.length,added);ElementEditee=newElementEdit(e,curr.index,removed,added);ev.addEdit(ee);}else{System.err.println("WARNING:Triedtoreplaceelements");System.err.print("beyondboundaries:elementCount:");System.err.println(e.getElementCount());System.err.print("index:"+curr.index);System.err.println(",removed.length:"+removed.length);}}}}
13,794
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(pos); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,795
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = pos + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,796
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
privatevoidinsertFirstContentTag(ElementSpec[]data){ElementSpecfirst=data[0];BranchElementparagraph=(BranchElement)elementStack.peek();intindex=paragraph.getElementIndex(offset);Elementcurrent=paragraph.getElement(index);intnewEndOffset=offset+first.length;booleanonlyContent=data.length==1;Editedit=getEditForParagraphAndIndex(paragraph,index);switch(first.getDirection()){caseElementSpec.JoinPreviousDirection:if(current.getEndOffset()!=newEndOffset&&!onlyContent){ElementnewEl1=createLeafElement(paragraph,current.getAttributes(),current.getStartOffset(),newEndOffset);edit.addAddedElement(newEl1);edit.addRemovedElement(current);offset=newEndOffset;}break;caseElementSpec.JoinNextDirection:if(offset!=0){ElementnewEl1=createLeafElement(paragraph,current.getAttributes(),current.getStartOffset(),offset);edit.addAddedElement(newEl1);Elementnext=paragraph.getElement(index+1);if(onlyContent)newEl1=createLeafElement(paragraph,next.getAttributes(),offset,next.getEndOffset());else{newEl1=createLeafElement(paragraph,next.getAttributes(),offset,newEndOffset);offset=newEndOffset;}edit.addAddedElement(newEl1);edit.addRemovedElement(current);edit.addRemovedElement(next);}break;default:if(current.getStartOffset()!=offset){ElementnewEl=createLeafElement(paragraph,current.getAttributes(),current.getStartOffset(),offset);edit.addAddedElement(newEl);}edit.addRemovedElement(current);ElementnewEl1=createLeafElement(paragraph,first.getAttributes(),offset,newEndOffset);edit.addAddedElement(newEl1);if(current.getEndOffset()!=endOffset)recreateLeaves(newEndOffset,paragraph,onlyContent);elseoffset=newEndOffset;break;}}
13,797
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (pos != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,798
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(pos); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,799
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), pos, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,800
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,801
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != pos) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,802
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(pos); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,803
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), pos, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), pos, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
13,804
private void insertFracture(ElementSpec tag) { // insert the fracture at offset. BranchElement parent = (BranchElement) elementStack.peek(); int parentIndex = parent.getElementIndex(offset); AttributeSet parentAtts = parent.getAttributes(); Element toFracture = parent.getElement(parentIndex); int parSize = parent.getElementCount(); Edit edit = getEditForParagraphAndIndex(parent, parentIndex); Element frac = toFracture; int leftIns = 0; int indexOfFrac = toFracture.getElementIndex(offset); int size = toFracture.getElementCount(); // gets the leaf that falls along the fracture frac = toFracture.getElement(indexOfFrac); while (!frac.isLeaf()) frac = frac.getElement(frac.getElementIndex(offset)); AttributeSet atts = frac.getAttributes(); int fracStart = frac.getStartOffset(); int fracEnd = frac.getEndOffset(); if (offset > fracStart && offset < fracEnd) { // recreate left-side of branch and all its children before offset // add the fractured leaves to the right branch BranchElement rightBranch = (BranchElement) createBranchElement(parent, parentAtts); // Check if left branch has already been edited. If so, we only // need to create the right branch. BranchElement leftBranch = null; Element[] added = null; if (edit.added.size() > 0 || edit.removed.size() > 0) { added = new Element[] { rightBranch }; // don't try to remove left part of tree parentIndex++; } else { leftBranch = (BranchElement) createBranchElement(parent, parentAtts); added = new Element[] { leftBranch, rightBranch }; // add fracture to leftBranch Element leftFracturedLeaf = createLeafElement(leftBranch, atts, fracStart, offset); leftBranch.replace(leftIns, 0, new Element[] { leftFracturedLeaf }); } if (!toFracture.isLeaf()) { // add all non-fracture elements to the branches if (indexOfFrac > 0 && leftBranch != null) { Element[] add = new Element[indexOfFrac]; for (int i = 0; i < indexOfFrac; i++) add[i] = toFracture.getElement(i); leftIns = add.length; leftBranch.replace(0, 0, add); } int count = size - indexOfFrac - 1; if (count > 0) { Element[] add = new Element[count]; int j = 0; int i = indexOfFrac + 1; while (j < count) add[j++] = toFracture.getElement(i++); rightBranch.replace(0, 0, add); } } // add to fracture to rightBranch // Check if we can join the right frac leaf with the next leaf int rm = 0; int end = fracEnd; Element next = rightBranch.getElement(0); if (next != null && next.isLeaf() && next.getAttributes().isEqual(atts)) { end = next.getEndOffset(); rm = 1; } Element rightFracturedLeaf = createLeafElement(rightBranch, atts, offset, end); rightBranch.replace(0, rm, new Element[] { rightFracturedLeaf }); // recreate those elements after parentIndex and add/remove all // new/old elements to parent int remove = parSize - parentIndex; Element[] removed = new Element[0]; Element[] added2 = new Element[0]; if (remove > 0) { removed = new Element[remove]; int s = 0; for (int j = parentIndex; j < parSize; j++) removed[s++] = parent.getElement(j); edit.addRemovedElements(removed); added2 = recreateAfterFracture(removed, parent, 1, rightBranch.getEndOffset()); } edit.addAddedElements(added); edit.addAddedElements(added2); elementStack.push(rightBranch); lastFractured = rightFracturedLeaf; } else fracNotCreated = true; }
private void insertFracture(ElementSpec tag) { // insert the fracture at offset. BranchElement parent = (BranchElement) elementStack.peek(); int parentIndex = parent.getElementIndex(pos); AttributeSet parentAtts = parent.getAttributes(); Element toFracture = parent.getElement(parentIndex); int parSize = parent.getElementCount(); Edit edit = getEditForParagraphAndIndex(parent, parentIndex); Element frac = toFracture; int leftIns = 0; int indexOfFrac = toFracture.getElementIndex(offset); int size = toFracture.getElementCount(); // gets the leaf that falls along the fracture frac = toFracture.getElement(indexOfFrac); while (!frac.isLeaf()) frac = frac.getElement(frac.getElementIndex(offset)); AttributeSet atts = frac.getAttributes(); int fracStart = frac.getStartOffset(); int fracEnd = frac.getEndOffset(); if (offset > fracStart && offset < fracEnd) { // recreate left-side of branch and all its children before offset // add the fractured leaves to the right branch BranchElement rightBranch = (BranchElement) createBranchElement(parent, parentAtts); // Check if left branch has already been edited. If so, we only // need to create the right branch. BranchElement leftBranch = null; Element[] added = null; if (edit.added.size() > 0 || edit.removed.size() > 0) { added = new Element[] { rightBranch }; // don't try to remove left part of tree parentIndex++; } else { leftBranch = (BranchElement) createBranchElement(parent, parentAtts); added = new Element[] { leftBranch, rightBranch }; // add fracture to leftBranch Element leftFracturedLeaf = createLeafElement(leftBranch, atts, fracStart, offset); leftBranch.replace(leftIns, 0, new Element[] { leftFracturedLeaf }); } if (!toFracture.isLeaf()) { // add all non-fracture elements to the branches if (indexOfFrac > 0 && leftBranch != null) { Element[] add = new Element[indexOfFrac]; for (int i = 0; i < indexOfFrac; i++) add[i] = toFracture.getElement(i); leftIns = add.length; leftBranch.replace(0, 0, add); } int count = size - indexOfFrac - 1; if (count > 0) { Element[] add = new Element[count]; int j = 0; int i = indexOfFrac + 1; while (j < count) add[j++] = toFracture.getElement(i++); rightBranch.replace(0, 0, add); } } // add to fracture to rightBranch // Check if we can join the right frac leaf with the next leaf int rm = 0; int end = fracEnd; Element next = rightBranch.getElement(0); if (next != null && next.isLeaf() && next.getAttributes().isEqual(atts)) { end = next.getEndOffset(); rm = 1; } Element rightFracturedLeaf = createLeafElement(rightBranch, atts, offset, end); rightBranch.replace(0, rm, new Element[] { rightFracturedLeaf }); // recreate those elements after parentIndex and add/remove all // new/old elements to parent int remove = parSize - parentIndex; Element[] removed = new Element[0]; Element[] added2 = new Element[0]; if (remove > 0) { removed = new Element[remove]; int s = 0; for (int j = parentIndex; j < parSize; j++) removed[s++] = parent.getElement(j); edit.addRemovedElements(removed); added2 = recreateAfterFracture(removed, parent, 1, rightBranch.getEndOffset()); } edit.addAddedElements(added); edit.addAddedElements(added2); elementStack.push(rightBranch); lastFractured = rightFracturedLeaf; } else fracNotCreated = true; }
13,805
private void insertFracture(ElementSpec tag) { // insert the fracture at offset. BranchElement parent = (BranchElement) elementStack.peek(); int parentIndex = parent.getElementIndex(offset); AttributeSet parentAtts = parent.getAttributes(); Element toFracture = parent.getElement(parentIndex); int parSize = parent.getElementCount(); Edit edit = getEditForParagraphAndIndex(parent, parentIndex); Element frac = toFracture; int leftIns = 0; int indexOfFrac = toFracture.getElementIndex(offset); int size = toFracture.getElementCount(); // gets the leaf that falls along the fracture frac = toFracture.getElement(indexOfFrac); while (!frac.isLeaf()) frac = frac.getElement(frac.getElementIndex(offset)); AttributeSet atts = frac.getAttributes(); int fracStart = frac.getStartOffset(); int fracEnd = frac.getEndOffset(); if (offset > fracStart && offset < fracEnd) { // recreate left-side of branch and all its children before offset // add the fractured leaves to the right branch BranchElement rightBranch = (BranchElement) createBranchElement(parent, parentAtts); // Check if left branch has already been edited. If so, we only // need to create the right branch. BranchElement leftBranch = null; Element[] added = null; if (edit.added.size() > 0 || edit.removed.size() > 0) { added = new Element[] { rightBranch }; // don't try to remove left part of tree parentIndex++; } else { leftBranch = (BranchElement) createBranchElement(parent, parentAtts); added = new Element[] { leftBranch, rightBranch }; // add fracture to leftBranch Element leftFracturedLeaf = createLeafElement(leftBranch, atts, fracStart, offset); leftBranch.replace(leftIns, 0, new Element[] { leftFracturedLeaf }); } if (!toFracture.isLeaf()) { // add all non-fracture elements to the branches if (indexOfFrac > 0 && leftBranch != null) { Element[] add = new Element[indexOfFrac]; for (int i = 0; i < indexOfFrac; i++) add[i] = toFracture.getElement(i); leftIns = add.length; leftBranch.replace(0, 0, add); } int count = size - indexOfFrac - 1; if (count > 0) { Element[] add = new Element[count]; int j = 0; int i = indexOfFrac + 1; while (j < count) add[j++] = toFracture.getElement(i++); rightBranch.replace(0, 0, add); } } // add to fracture to rightBranch // Check if we can join the right frac leaf with the next leaf int rm = 0; int end = fracEnd; Element next = rightBranch.getElement(0); if (next != null && next.isLeaf() && next.getAttributes().isEqual(atts)) { end = next.getEndOffset(); rm = 1; } Element rightFracturedLeaf = createLeafElement(rightBranch, atts, offset, end); rightBranch.replace(0, rm, new Element[] { rightFracturedLeaf }); // recreate those elements after parentIndex and add/remove all // new/old elements to parent int remove = parSize - parentIndex; Element[] removed = new Element[0]; Element[] added2 = new Element[0]; if (remove > 0) { removed = new Element[remove]; int s = 0; for (int j = parentIndex; j < parSize; j++) removed[s++] = parent.getElement(j); edit.addRemovedElements(removed); added2 = recreateAfterFracture(removed, parent, 1, rightBranch.getEndOffset()); } edit.addAddedElements(added); edit.addAddedElements(added2); elementStack.push(rightBranch); lastFractured = rightFracturedLeaf; } else fracNotCreated = true; }
privatevoidinsertFracture(ElementSpectag){//insertthefractureatoffset.BranchElementparent=(BranchElement)elementStack.peek();intparentIndex=parent.getElementIndex(offset);AttributeSetparentAtts=parent.getAttributes();ElementtoFracture=parent.getElement(parentIndex);intparSize=parent.getElementCount();Editedit=getEditForParagraphAndIndex(parent,parentIndex);Elementfrac=toFracture;intleftIns=0;intindexOfFrac=toFracture.getElementIndex(offset);intsize=toFracture.getElementCount();//getstheleafthatfallsalongthefracturefrac=toFracture.getElement(indexOfFrac);while(!frac.isLeaf())frac=frac.getElement(frac.getElementIndex(offset));AttributeSetatts=frac.getAttributes();intfracStart=frac.getStartOffset();intfracEnd=frac.getEndOffset();if(offset>fracStart&&offset<fracEnd){//recreateleft-sideofbranchandallitschildrenbeforeoffset//addthefracturedleavestotherightbranchBranchElementrightBranch=(BranchElement)createBranchElement(parent,parentAtts);//Checkifleftbranchhasalreadybeenedited.Ifso,weonly//needtocreatetherightbranch.BranchElementleftBranch=null;Element[]added=null;if(edit.added.size()>0||edit.removed.size()>0){added=newElement[]{rightBranch};//don'ttrytoremoveleftpartoftreeparentIndex++;}else{leftBranch=(BranchElement)createBranchElement(parent,parentAtts);added=newElement[]{leftBranch,rightBranch};//addfracturetoleftBranchElementleftFracturedLeaf=createLeafElement(leftBranch,atts,fracStart,offset);leftBranch.replace(leftIns,0,newElement[]{leftFracturedLeaf});}if(!toFracture.isLeaf()){//addallnon-fractureelementstothebranchesif(indexOfFrac>0&&leftBranch!=null){Element[]add=newElement[indexOfFrac];for(inti=0;i<indexOfFrac;i++)add[i]=toFracture.getElement(i);leftIns=add.length;leftBranch.replace(0,0,add);}intcount=size-indexOfFrac-1;if(count>0){Element[]add=newElement[count];intj=0;inti=indexOfFrac+1;while(j<count)add[j++]=toFracture.getElement(i++);rightBranch.replace(0,0,add);}}//addtofracturetorightBranch//Checkifwecanjointherightfracleafwiththenextleafintrm=0;intend=fracEnd;Elementnext=rightBranch.getElement(0);if(next!=null&&next.isLeaf()&&next.getAttributes().isEqual(atts)){end=next.getEndOffset();rm=1;}ElementrightFracturedLeaf=createLeafElement(rightBranch,atts,offset,end);rightBranch.replace(0,rm,newElement[]{rightFracturedLeaf});//recreatethoseelementsafterparentIndexandadd/removeall//new/oldelementstoparentintremove=parSize-parentIndex;Element[]removed=newElement[0];Element[]added2=newElement[0];if(remove>0){removed=newElement[remove];ints=0;for(intj=parentIndex;j<parSize;j++)removed[s++]=parent.getElement(j);edit.addRemovedElements(removed);added2=recreateAfterFracture(removed,parent,1,rightBranch.getEndOffset());}edit.addAddedElements(added);edit.addAddedElements(added2);elementStack.push(rightBranch);lastFractured=rightFracturedLeaf;}elsefracNotCreated=true;}
13,806