122. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:38 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.

122.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\storage AbstractBufferedImageStorageFacade.java Mon Dec 4 21:35:00 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\storage AbstractBufferedImageStorageFacade.java Mon Dec 4 21:58:56 2017 UTC

122.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 362
Changed 2 4
Inserted 0 0
Removed 0 0

122.3 Comparison options

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

122.4 Active regular expressions

No regular expressions were active.

122.5 Comparison detail

  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  30, 2008
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
WERFEJ
  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.exc hange.stor age;
  27  
  28   import gov .va.med.im aging.core .interface s.ImageSto rageFacade ;
  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 .ImageQual ity;
  37   import gov .va.med.im aging.exch ange.enums .StoragePr oximity;
  38  
  39   import org .apache.lo gging.log4 j.LogManag er;
  40   import org .apache.lo gging.log4 j.Logger;
  41  
  42   /**
  43    * Abstrac t storage  facade tha t uses buf fer pool l ists and b uffers the  image dat a in memor y to make
  44    * re-usin g the data  more effi cient.
  45    * 
  46    * @author         
WERFEJ
  47    *
  48    */
  49   public abs tract clas s Abstract BufferedIm ageStorage Facade 
  50   implements  ImageStor ageFacade 
  51   {
  52           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Abst ractBuffer edImageSto rageFacade .class);
  53  
  54           //  Member va riables      
  55           pr otected By teBufferBa ckedImageI nputStream  imageBuff er = null;
  56           pr otected By teBufferBa ckedInputS tream txtB uffer = nu ll;
  57           pr otected Im ageQuality  imageQual ity = null ;
  58  
  59           /* *
  60            *  Abstract  function t o retrieve  an open a  ImageStre amResponse  for an im age that m ight inclu de
  61            *  the TXT f ile
  62            *  
  63            *  @param im ageIdentif ier
  64            *  @param im ageCredent ials
  65            *  @param im ageProximi ty
  66            *  @param re questForma tQualityLi st
  67            *  @return
  68            *  @throws I mageNearLi neExceptio n
  69            *  @throws I mageNotFou ndExceptio n
  70            *  @throws C onnectionE xception
  71            * /
  72           pr otected ab stract Byt eBufferBac kedImageSt reamRespon se openIma geStreamIn ternal(Str ing imageI dentifier,
  73                    Stor ageCredent ials image Credential s,
  74                    Stor ageProximi ty imagePr oximity,
  75                    Imag eFormatQua lityList r equestForm atQualityL ist)
  76           th rows Image NearLineEx ception, I mageNotFou ndExceptio n,
  77                    Conn ectionExce ption, Ima geConversi onExceptio n, MethodE xception;
  78           
  79           /* *
  80            *  Abstract  function t o retrieve  an open s ized input  stream to  a TXT fil e
  81            *  @param im ageIdentif ier
  82            *  @param im ageCredent ials
  83            *  @param im ageProximi ty
  84            *  @return
  85            *  @throws I mageNearLi neExceptio n
  86            *  @throws I mageNotFou ndExceptio n
  87            *  @throws C onnectionE xception
  88            * /
  89           pr otected ab stract Byt eBufferBac kedInputSt ream openT XTStreamIn ternal(Str ing imageI dentifier,
  90                    Stor ageCredent ials image Credential s, Storage Proximity  imageProxi mity)
  91           th rows Image NearLineEx ception, I mageNotFou ndExceptio n,
  92                    Conn ectionExce ption, Met hodExcepti on;
  93  
  94           /*  (non-Java doc)
  95            *  @see gov. va.med.ima ging.core. interfaces .ImageStor ageFacade# openImageS tream(java .lang.Stri ng, gov.va .med.imagi ng.core.in terfaces.S torageCred entials, g ov.va.med. imaging.ex change.enu ms.Storage Proximity,  gov.va.me d.imaging. exchange.b usiness.Im ageFormatQ ualityList )
  96            * /
  97           @O verride
  98           pu blic ByteB ufferBacke dImageStre amResponse  openImage Stream(Str ing imageI dentifier,
  99                    Stor ageCredent ials image Credential s,
  100                    Stor ageProximi ty imagePr oximity,
  101                    Imag eFormatQua lityList r equestForm atQualityL ist)
  102           th rows Image NearLineEx ception, I mageNotFou ndExceptio n,
  103                    Conn ectionExce ption, Ima geConversi onExceptio n, MethodE xception
  104           {
  105                    if(i mageBuffer  == null)
  106                    {
  107                             logger .info("Ima ge buffer  is null, r etrieving  Image Stre am from st orage devi ce");
  108                             ByteBu fferBacked ImageStrea mResponse  response =  openImage StreamInte rnal(image Identifier
  109                                      imageCre dentials,  imageProxi mity, requ estFormatQ ualityList );
  110                             imageQ uality = r esponse.ge tImageQual ity();
  111                             imageB uffer = re sponse.get ImageStrea m();
  112                             if((tx tBuffer ==  null) &&  (response. getTxtStre am() != nu ll))
  113                             {
  114                                      txtBuffe r = respon se.getTxtS tream();
  115                             }
  116                    }
  117                    else
  118                    {
  119                             logger .info("Ima ge already  buffered,  using buf fer data i n response ");
  120                    }
  121                    Byte BufferBack edImageStr eamRespons e response  = new Byt eBufferBac kedImageSt reamRespon se(imageBu ffer);
  122                    resp onse.setIm ageQuality (imageQual ity);
  123                    
  124                    if(t xtBuffer ! = null)
  125                    {
  126                             respon se.setTxtS tream(txtB uffer);
  127                    }
  128                    retu rn respons e;
  129           }
  130  
  131           /*  (non-Java doc)
  132            *  @see gov. va.med.ima ging.core. interfaces .ImageStor ageFacade# openTXTStr eam(java.l ang.String , gov.va.m ed.imaging .core.inte rfaces.Sto rageCreden tials, gov .va.med.im aging.exch ange.enums .StoragePr oximity)
  133            * /
  134           @O verride
  135           pu blic ByteB ufferBacke dInputStre am openTXT Stream(Str ing imageI dentifier,
  136                    Stor ageCredent ials image Credential s, Storage Proximity  imageProxi mity)
  137           th rows Image NearLineEx ception, I mageNotFou ndExceptio n,
  138                    Conn ectionExce ption, Met hodExcepti on
  139           {
  140                    if(t xtBuffer = = null)
  141                    {
  142                             logger .info("Txt  buffer is  null, ret rieving TX T Stream f rom storag e device") ;
  143                             txtBuf fer = open TXTStreamI nternal(im ageIdentif ier, 
  144                                      imageCre dentials,  imageProxi mity);                        
  145                    }
  146                    else
  147                    {
  148                             logger .info("TXT  File alre ady buffer ed, using  buffer dat a in respo nse");
  149                    }
  150                    retu rn txtBuff er;
  151           }
  152  
  153           /*  (non-Java doc)
  154            *  @see gov. va.med.ima ging.core. interfaces .ImageStor ageFacade# clearBuffe rs()
  155            * /
  156           @O verride
  157           pu blic void  clearBuffe rs() 
  158           {
  159                    clea rImageBuff er();
  160                    clea rTxtBuffer ();
  161           }
  162           
  163           pr ivate void  clearImag eBuffer()
  164           {
  165                    if(i mageBuffer  != null)
  166                    {
  167                             // JMW  3/8/2010  - fix for  corrupted  image prob lem - buff er never g oes back i nto pool,  will alway s create a  new buffe r when nee ded
  168                             //getB ufferPool( ).releaseB uffer(imag eBuffer.ge tBuffer()) ;
  169                             imageB uffer = nu ll;
  170                    }
  171                    imag eQuality =  null;
  172           }
  173           
  174           pr ivate void  clearTxtB uffer()
  175           {
  176                    if(t xtBuffer ! = null)
  177                    {
  178                             // JMW  3/8/2010  - fix for  corrupted  image prob lem - buff er never g oes back i nto pool,  will alway s create a  new buffe r when nee ded
  179                             //getB ufferPool( ).releaseB uffer(txtB uffer.getB uffer());
  180                             txtBuf fer = null ;
  181                    }
  182           }
  183   }