Produced by Araxis Merge on 6/11/2019 10:54:14 AM Eastern Daylight 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 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\report | FileSystemReportPersister.java | Wed May 29 15:26:02 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\report | FileSystemReportPersister.java | Mon Jun 10 19:27:47 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 152 |
| 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 | * Copyrii ght 2004 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | // Package | |
| 5 | package go v.va.med.f w.report; | |
| 6 | ||
| 7 | // Java cl asses | |
| 8 | import jav a.io.Buffe redOutputS tream; | |
| 9 | import jav a.io.ByteA rrayOutput Stream; | |
| 10 | import jav a.io.IOExc eption; | |
| 11 | import jav a.io.Outpu tStream; | |
| 12 | ||
| 13 | import org .apache.co mmons.lang .Validate; | |
| 14 | ||
| 15 | import gov .va.med.fw .service.A bstractCom ponent; | |
| 16 | import gov .va.med.fw .util.File Utils; | |
| 17 | ||
| 18 | /** | |
| 19 | * Persist s a genera ted report stream on to a file system | |
| 20 | * | |
| 21 | * Project : Framewor k</br> Cre ated on: 3 :46:42 PM </br> | |
| 22 | * | |
| 23 | * @author DN S
|
|
| 24 | */ | |
| 25 | public cla ss FileSys temReportP ersister e xtends Abs tractCompo nent imple ments Repo rtPersiste r { | |
| 26 | ||
| 27 | /* * | |
| 28 | * An instan ce of seri alVersionU ID | |
| 29 | * / | |
| 30 | pr ivate stat ic final l ong serial VersionUID = -878185 4136647357 20L; | |
| 31 | ||
| 32 | /* * | |
| 33 | * A default construct or | |
| 34 | * / | |
| 35 | pu blic FileS ystemRepor tPersister () { | |
| 36 | supe r(); | |
| 37 | } | |
| 38 | ||
| 39 | /* * | |
| 40 | * @see gov. va.med.fw. report.Rep ortPersist er#persist (gov.va.me d.fw.repor t.ReportCo nfiguratio n, | |
| 41 | * java .io.ByteAr rayOutputS tream) | |
| 42 | * / | |
| 43 | pu blic void persist(Re portConfig uration co nfig, Byte ArrayOutpu tStream st ream) | |
| 44 | throws ReportExc eption { | |
| 45 | ||
| 46 | Vali date.notNu ll(config, "A report configura tion must not be NUL L"); | |
| 47 | Vali date.notNu ll(stream, "A report stream mu st not be NULL"); | |
| 48 | Outp utStream o utput = nu ll; | |
| 49 | try { | |
| 50 | String outputFil e = config .getReport OutputName (); | |
| 51 | output = new Buf feredOutpu tStream(Fi leUtils.ge tOutputStr eam(output File)); | |
| 52 | stream .writeTo(o utput); | |
| 53 | ||
| 54 | // FLu sh content s to an ou tput strea m | |
| 55 | stream .flush(); | |
| 56 | stream .close(); | |
| 57 | ||
| 58 | } ca tch (IOExc eption e) { | |
| 59 | throw new Report Exception( "Failed to write a r eport to a stream ", e); | |
| 60 | } | |
| 61 | fina lly { | |
| 62 | if(out put != nul l) { | |
| 63 | safeClos eOutput(ou tput); | |
| 64 | } | |
| 65 | } | |
| 66 | } | |
| 67 | ||
| 68 | pu blic stati c void saf eCloseOutp ut(OutputS tream outp ut) { | |
| 69 | if (output ! = null) { | |
| 70 | try { | |
| 71 | output .flush(); | |
| 72 | output .close(); | |
| 73 | } catch (E xception e ) { | |
| 74 | } | |
| 75 | } | |
| 76 | } | |
| 77 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.