Produced by Araxis Merge on 12/5/2017 12:06:44 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomDCFCommon\src\java\gov\va\med\imaging\dicom\dcftoolkit\common\license\gui | LicenseDialog.java | Mon Dec 4 21:35:32 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomDCFCommon\src\java\gov\va\med\imaging\dicom\dcftoolkit\common\license\gui | LicenseDialog.java | Mon Dec 4 22:02:23 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 242 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /** | |
| 2 | * | |
| 3 | Package: MAG - Vis tA Imaging | |
| 4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
| 5 | Date Cre ated: Octo ber 5, 200 5 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 8 | Descript ion: | |
| 9 | ||
| 10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 11 | ;; Property of the US Government . | |
| 12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
| 13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
| 14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
| 15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
| 16 | ;; telephon e (301) 73 4-0100. | |
| 17 | ;; | |
| 18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
| 19 | ;; a Class I I medical device. A s such, it may not b e changed | |
| 20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
| 21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
| 22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
| 23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 24 | */ | |
| 25 | ||
| 26 | package go v.va.med.i maging.dic om.dcftool kit.common .license.g ui; | |
| 27 | ||
| 28 | import gov .va.med.im aging.dico m.dcftoolk it.common. license.Ke yFilter; | |
| 29 | ||
| 30 | import jav a.awt.Comp onent; | |
| 31 | import jav a.io.Buffe redReader; | |
| 32 | import jav a.io.File; | |
| 33 | import jav a.io.FileI nputStream ; | |
| 34 | import jav a.io.FileO utputStrea m; | |
| 35 | import jav a.io.IOExc eption; | |
| 36 | import jav a.io.Input StreamRead er; | |
| 37 | import jav a.nio.chan nels.FileC hannel; | |
| 38 | ||
| 39 | import jav ax.swing.J FileChoose r; | |
| 40 | ||
| 41 | import org .apache.lo gging.log4 j.LogManag er; | |
| 42 | import org .apache.lo gging.log4 j.Logger; | |
| 43 | /** | |
| 44 | * | |
| 45 | * @author William P eterson | |
| 46 | * | |
| 47 | */ | |
| 48 | public cla ss License Dialog { | |
| 49 | ||
| 50 | privat e static f inal Logge r logger = LogManage r.getLogge r (License Dialog.cla ss); | |
| 51 | privat e boolean cancellati on = false ; | |
| 52 | ||
| 53 | /** | |
| 54 | * Con structor | |
| 55 | * | |
| 56 | * | |
| 57 | */ | |
| 58 | public LicenseDi alog() { | |
| 59 | su per(); | |
| 60 | // | |
| 61 | } | |
| 62 | ||
| 63 | public File brow seForFile( Component parent) { | |
| 64 | Fi le filenam e = null; | |
| 65 | ||
| 66 | // Create Fil eChooser o bject | |
| 67 | JF ileChooser chooser = new JFile Chooser(); | |
| 68 | // Setup JFil eChooser. | |
| 69 | ch ooser.setF ileFilter( new KeyFil ter()); | |
| 70 | ch ooser.setC urrentDire ctory(new File(".")) ; | |
| 71 | ch ooser.setM ultiSelect ionEnabled (false); | |
| 72 | ||
| 73 | // Use FileCh ooser to s elect corr ect file. | |
| 74 | in t result = chooser.s howOpenDia log(parent ); | |
| 75 | if (result == JFileChoo ser.APPROV E_OPTION){ | |
| 76 | filename = chooser .getSelect edFile(); | |
| 77 | } | |
| 78 | re turn filen ame; | |
| 79 | } | |
| 80 | ||
| 81 | public void load File(File filename){ | |
| 82 | St ring rootP ath = ""; | |
| 83 | tr y{ | |
| 84 | //get th e correct path via e nvironment variable | |
| 85 | Process pc = Runti me.getRunt ime().exec ("cmd.exe /c echo %D CF_ROOT%") ; | |
| 86 | Buffered Reader br = new Buff eredReader | |
| 87 | ( n ew InputSt reamReader ( pc.getIn putStream( ) ) ); | |
| 88 | rootPath = br.read Line(); | |
| 89 | ||
| 90 | //Create path to n ew license location. | |
| 91 | String n uPath = ro otPath+"\\ cfg\\syste minfo"; | |
| 92 | File old File = new File(nuPa th); | |
| 93 | //Delete current s ysteminfo file. | |
| 94 | oldFile. delete(); | |
| 95 | ||
| 96 | // Creat e channel on the sou rce | |
| 97 | FileChan nel srcCha nnel = new FileInput Stream(fil ename).get Channel(); | |
| 98 | ||
| 99 | // Creat e channel on the des tination | |
| 100 | FileChan nel dstCha nnel = new FileOutpu tStream(ol dFile).get Channel(); | |
| 101 | ||
| 102 | // Copy file conte nts from s ource to d estination | |
| 103 | dstChann el.transfe rFrom(srcC hannel, 0, srcChanne l.size()); | |
| 104 | ||
| 105 | // Close the chann els | |
| 106 | srcChann el.close() ; | |
| 107 | dstChann el.close() ; | |
| 108 | ||
| 109 | } | |
| 110 | ca tch(IOExce ption ioe) { | |
| 111 | // | |
| 112 | } | |
| 113 | } | |
| 114 | ||
| 115 | public void canc el(){ | |
| 116 | th is.cancell ation = tr ue; | |
| 117 | } | |
| 118 | ||
| 119 | public boolean i sCancelled (){ | |
| 120 | re turn this. cancellati on; | |
| 121 | } | |
| 122 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.