Produced by Araxis Merge on 7/10/2017 1:01:46 PM Central 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 | C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\MIXDataSource\main\src\java\gov\va\med\imaging\mix\storage | MixStorageUtility.java | Thu Jun 29 17:23:07 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\MIXDataSource\main\src\java\gov\va\med\imaging\mix\storage | MixStorageUtility.java | Thu Jul 6 15:04:31 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 212 |
| Changed | 2 | 4 |
| 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: Sep 26, 2008 | |
| 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.mix .storage; | |
| 27 | ||
| 28 | import gov .va.med.im aging.Size dInputStre am; | |
| 29 | import gov .va.med.im aging.core .interface s.StorageC redentials ; | |
| 30 | import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on; | |
| 31 | import gov .va.med.im aging.core .interface s.exceptio ns.ImageCo nversionEx ception; | |
| 32 | import gov .va.med.im aging.core .interface s.exceptio ns.ImageNe arLineExce ption; | |
| 33 | import gov .va.med.im aging.core .interface s.exceptio ns.ImageNo tFoundExce ption; | |
| 34 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
| 35 | import gov .va.med.im aging.exch ange.busin ess.ImageF ormatQuali tyList; | |
| 36 | import gov .va.med.im aging.exch ange.enums .StoragePr oximity; | |
| 37 | import gov .va.med.im aging.exch ange.stora ge.Abstrac tBufferedI mageStorag eFacade; | |
| 38 | import gov .va.med.im aging.exch ange.stora ge.ByteBuf ferBackedI mageInputS tream; | |
| 39 | import gov .va.med.im aging.exch ange.stora ge.ByteBuf ferBackedI mageStream Response; | |
| 40 | import gov .va.med.im aging.exch ange.stora ge.ByteBuf ferBackedI nputStream ; | |
| 41 | import gov .va.med.im aging.mix. proxy.MixP roxy; | |
| 42 | ||
| 43 | /** | |
| 44 | * @author
|
|
| 45 | * | |
| 46 | */ | |
| 47 | public cla ss MixStor ageUtility | |
| 48 | extends Ab stractBuff eredImageS torageFaca de | |
| 49 | { | |
| 50 | pr ivate fina l MixProxy imagingPr oxy; | |
| 51 | ||
| 52 | pu blic MixSt orageUtili ty(MixProx y imagingP roxy) | |
| 53 | { | |
| 54 | this .imagingPr oxy = imag ingProxy; | |
| 55 | } | |
| 56 | ||
| 57 | /* (non-Java doc) | |
| 58 | * @see gov. va.med.ima ging.excha nge.storag e.Abstract BufferedIm ageStorage Facade#ope nImageStre amInternal (java.lang .String, g ov.va.med. imaging.co re.interfa ces.Storag eCredentia ls, gov.va .med.imagi ng.exchang e.enums.St orageProxi mity, gov. va.med.ima ging.excha nge.busine ss.ImageFo rmatQualit yList) | |
| 59 | * / | |
| 60 | @O verride | |
| 61 | pr otected By teBufferBa ckedImageS treamRespo nse openIm ageStreamI nternal( | |
| 62 | Stri ng imageId entifier, StorageCre dentials i mageCreden tials, | |
| 63 | Stor ageProximi ty imagePr oximity, | |
| 64 | Imag eFormatQua lityList r equestForm atQualityL ist) | |
| 65 | th rows Image NearLineEx ception, I mageNotFou ndExceptio n, | |
| 66 | Conn ectionExce ption, Ima geConversi onExceptio n, MethodE xception | |
| 67 | { | |
| 68 | Size dInputStre am sizedSt ream = ima gingProxy. getInstanc e(imageIde ntifier, r equestForm atQualityL ist, false ); | |
| 69 | if(s izedStream == null) | |
| 70 | throw new ImageN otFoundExc eption("No input str eam return ed from Ex change sou rce [" + i magingProx y.getImage ProxyServi ce() + "] for image [" + image Identifier + "]."); | |
| 71 | ||
| 72 | // J MW 3/21/20 11 P104 - changed ca ll to crea te new Byt eBufferBac kedImageIn putStream to detect if the inp ut stream | |
| 73 | // i s an empty stream. | |
| 74 | // I f the stre am is empt y, then th row a new ImageNotFo undExcepti on to prev ent the em pty image from being used and cached | |
| 75 | Byte BufferBack edImageInp utStream i mageInputS tream = ne w ByteBuff erBackedIm ageInputSt ream( | |
| 76 | sizedStr eam.getInS tream(), s izedStream .getByteSi ze(), imag ingProxy.g etResponse Checksum() , true); | |
| 77 | if(i mageInputS tream.isEm ptyStream( )) | |
| 78 | throw new ImageN otFoundExc eption("De tected 0 l ength inpu t stream r esponse fr om Exchang e for imag e '" + ima geIdentifi er + "'.") ; | |
| 79 | ||
| 80 | Byte BufferBack edImageStr eamRespons e response = | |
| 81 | new By teBufferBa ckedImageS treamRespo nse(imageI nputStream ); | |
| 82 | resp onse.setIm ageQuality (imagingPr oxy.getReq uestedQual ity()); | |
| 83 | retu rn respons e; | |
| 84 | } | |
| 85 | ||
| 86 | /* (non-Java doc) | |
| 87 | * @see gov. va.med.ima ging.excha nge.storag e.Abstract BufferedIm ageStorage Facade#ope nTXTStream Internal(j ava.lang.S tring, gov .va.med.im aging.core .interface s.StorageC redentials , gov.va.m ed.imaging .exchange. enums.Stor ageProximi ty) | |
| 88 | * / | |
| 89 | @O verride | |
| 90 | pr otected By teBufferBa ckedInputS tream open TXTStreamI nternal(St ring image Identifier , | |
| 91 | Stor ageCredent ials image Credential s, Storage Proximity imageProxi mity) | |
| 92 | th rows Image NearLineEx ception, I mageNotFou ndExceptio n, | |
| 93 | Conn ectionExce ption | |
| 94 | { | |
| 95 | retu rn null; | |
| 96 | } | |
| 97 | ||
| 98 | /* (non-Java doc) | |
| 99 | * @see gov. va.med.ima ging.core. interfaces .ImageStor ageFacade# openPhotoI d(java.lan g.String, gov.va.med .imaging.c ore.interf aces.Stora geCredenti als) | |
| 100 | * / | |
| 101 | @O verride | |
| 102 | pu blic ByteB ufferBacke dInputStre am openPho toId(Strin g imageIde ntifier, | |
| 103 | Storag eCredentia ls imageCr edentials) | |
| 104 | th rows Image NotFoundEx ception, C onnectionE xception { | |
| 105 | ||
| 106 | retu rn null; | |
| 107 | } | |
| 108 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.