284. EPMO Open Source Coordination Office Redaction File Detail Report

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

284.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomUtilities\src\java\gov\va\med\imaging\dicom\utilities\reconstitution\impl DicomReconstitutionImpl.java Mon Dec 4 21:35:22 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomUtilities\src\java\gov\va\med\imaging\dicom\utilities\reconstitution\impl DicomReconstitutionImpl.java Mon Dec 4 22:03:11 2017 UTC

284.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 796
Changed 1 2
Inserted 0 0
Removed 0 0

284.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

284.4 Active regular expressions

No regular expressions were active.

284.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: Sept ember 26,  2005
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
PETERB
  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   package go v.va.med.i maging.dic om.utiliti es.reconst itution.im pl;
  26  
  27   import gov .va.med.im aging.Size dInputStre am;
  28   import gov .va.med.im aging.dico m.common.i nterfaces. IDicomData Set;
  29   import gov .va.med.im aging.dico m.dcftoolk it.utiliti es.excepti ons.DicomF ileExcepti on;
  30   import gov .va.med.im aging.dico m.dcftoolk it.utiliti es.excepti ons.TGAFil eException ;
  31   import gov .va.med.im aging.dico m.dcftoolk it.utiliti es.excepti ons.TGAFil eNotFoundE xception;
  32   import gov .va.med.im aging.dico m.dcftoolk it.utiliti es.reconst itution.Di comFileExt ractor;
  33   import gov .va.med.im aging.dico m.dcftoolk it.utiliti es.reconst itution.Le gacyTGAFil eParser;
  34   import gov .va.med.im aging.dico m.dcftoolk it.utiliti es.reconst itution.Le gacyTextFi leParser;
  35   import gov .va.med.im aging.dico m.dcftoolk it.utiliti es.reconst itution.Or iginalPixe lDataInfo;
  36   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomRecon stitutionE xception;
  37   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTGAFil eException ;
  38   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTGAFil eNotFoundE xception;
  39   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTextFi leExceptio n;
  40   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTextFi leExtracti onExceptio n;
  41   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTextFi leNotFound Exception;
  42   import gov .va.med.im aging.dico m.utilitie s.reconsti tution.int erfaces.ID icomRecons titution;
  43   import gov .va.med.im aging.exce ptions.Tex tFileExcep tion;
  44   import gov .va.med.im aging.exce ptions.Tex tFileExtra ctionExcep tion;
  45   import gov .va.med.im aging.exce ptions.Tex tFileNotFo undExcepti on;
  46   import gov .va.med.im aging.exch ange.busin ess.dicom. exceptions .DicomExce ption;
  47  
  48   import jav a.io.Buffe redReader;
  49   import jav a.io.Input StreamRead er;
  50   import jav a.util.Has hMap;
  51  
  52   import org .apache.lo gging.log4 j.LogManag er;
  53   import org .apache.lo gging.log4 j.Logger;
  54  
  55   /**
  56    *
  57    * @author  William P eterson
  58    * extende d by Csaba  Titton
  59    *                        for Vi X streamin g
  60    */
  61   public cla ss DicomRe constituti onImpl imp lements ID icomRecons titution {
  62       
  63       privat e static f inal Logge r LOGGER =  LogManage r.getLogge r (DicomRe constituti onImpl.cla ss);
  64  
  65       /**
  66        * Con structor
  67        *
  68        * 
  69        */
  70       public  DicomReco nstitution Impl() {
  71           su per();
  72           //
  73       }
  74       
  75       /* (no n-Javadoc)
  76            *  @see gov. va.med.ima ging.dicom .utilities .reconstit ution.IDic omReconstu tion#assem bleDicomOb ject(java. lang.Strin g, java.la ng.String,  java.util .HashMap)
  77            * /
  78       public  IDicomDat aSet assem bleDicomOb ject(Strin g textFile name,
  79                String t gaFilename , HashMap< String, St ring> hisC hanges)
  80                throws G enericDico mUtilities TextFileNo tFoundExce ption, Gen ericDicomU tilitiesTe xtFileExce ption, 
  81                GenericD icomUtilit iesTextFil eExtractio nException , GenericD icomUtilit iesTGAFile Exception,
  82                GenericD icomUtilit iesTGAFile NotFoundEx ception{
  83           
  84           ID icomDataSe t dds = nu ll;
  85           Or iginalPixe lDataInfo  originalPi xelData =  new Origin alPixelDat aInfo();
  86           tr y{
  87                LOGGER.i nfo(this.g etClass(). getName()  + ": Gener ic DICOM L ayer: " +
  88                         "parsing T ext file "  + textFil ename + "  ...");
  89                //Invoke  the extra ction of d ata from t he Text fi le.
  90                LegacyTe xtFilePars er textPar ser = new  LegacyText FileParser ();
  91                //FUTURE  A better  design wou ld have th e Original PixelDataI nfo object
  92                //  enca psulated w ithin the  DicomDataS et since i ts being p ushed arou nd.
  93                dds = te xtParser.c reateDicom DataSet(te xtFilename , original PixelData) ;
  94                
  95                LOGGER.i nfo(this.g etClass(). getName()  + ": Gener ic DICOM L ayer: " +
  96                         "parsing T GA/BIG fil e " + tgaF ilename +  " ...");
  97                String a cquisition Site = nul l;
  98                if(hisCh anges.cont ainsKey("0 032,1020") ){
  99                    acqu isitionSit e = (Strin g)hisChang es.get("00 32,1020");
  100                    dds. setAcquisi tionSite(a cquisition Site);
  101                }
  102                //Invoke  the extra ction of p ixel data  from the T arga file.
  103                LegacyTG AFileParse r tgaParse r = new Le gacyTGAFil eParser();
  104                tgaParse r.updateDi comDataSet WithPixelD ata(dds, t gaFilename , original PixelData) ;
  105                //Add th e Vista HI S changes  to the gen eric Dicom DataSet ob ject.  Thi s is done
  106                // by ca lling Csab a's code.
  107                dds.upda teHISChang esToDDS(hi sChanges);
  108                
  109                return d ds;
  110           }
  111           ca tch(TextFi leNotFound Exception  noText){
  112                LOGGER.e rror(noTex t.getMessa ge());
  113                LOGGER.e rror(this. getClass() .getName()  + ": " +
  114                         "\nExcepti on thrown  while asse mbling Dic om Object. ");
  115                throw ne w GenericD icomUtilit iesTextFil eNotFoundE xception(
  116                         "Failure t o assemble  Dicom Obj ect.", noT ext);
  117           }
  118           ca tch(TextFi leExtracti onExceptio n extract) {
  119                LOGGER.e rror(extra ct.getMess age());
  120                LOGGER.e rror(this. getClass() .getName()  + ": " +
  121                         "\nExcepti on thrown  while asse mbling Dic om Object. ");
  122                throw ne w GenericD icomUtilit iesTextFil eExtractio nException (
  123                         "Failure t o assemble  Dicom Obj ect.", ext ract);
  124           }
  125           ca tch(TextFi leExceptio n e){
  126                LOGGER.e rror(e.get Message()) ;
  127                LOGGER.e rror(this. getClass() .getName()  + ": " +
  128                         "\nExcepti on thrown  while asse mbling Dic om Object. ");
  129                throw ne w GenericD icomUtilit iesTextFil eException (
  130                         "Failure t o assemble  Dicom Obj ect.", e);
  131           }
  132           ca tch(TGAFil eNotFoundE xception n otga){
  133                LOGGER.e rror(notga .getMessag e());
  134                LOGGER.e rror(this. getClass() .getName()  + ": " +
  135                         "\nExcepti on thrown  while asse mbling Dic om Object. ");
  136                throw ne w GenericD icomUtilit iesTGAFile Exception(
  137                         "Failure t o assemble  Dicom Obj ect.", not ga);
  138           }
  139           ca tch(TGAFil eException  badtga){
  140                LOGGER.e rror(badtg a.getMessa ge());
  141                LOGGER.e rror(this. getClass() .getName() +": " +
  142                         "\nExcepti on thrown  while asse mbling Dic om Object. ");
  143                throw ne w GenericD icomUtilit iesTGAFile Exception(
  144                         "Failure t o assemble  Dicom Obj ect.", bad tga);
  145           }
  146           ca tch(DicomE xception d e){
  147                LOGGER.e rror(de.ge tMessage() );
  148                LOGGER.e rror(this. getClass() .getName()  + ": " +
  149                         "\nExcepti on thrown  while asse mbling Dic om Object. ");
  150                throw ne w GenericD icomUtilit iesTGAFile Exception(
  151                         "Failure t o assemble  Dicom Obj ect.", de) ;
  152           }
  153       }
  154  
  155       
  156       /* (no n-Javadoc)
  157            *  @see gov. va.med.ima ging.dicom .utilities .reconstit ution.IDic omReconstu tion#assem bleDicomOb ject(gov.v a.med.imag ing.SizedI nputStream , gov.va.m ed.imaging .SizedInpu tStream, j ava.util.H ashMap)
  158            * /
  159       public  IDicomDat aSet assem bleDicomOb ject(Sized InputStrea m sizedTex tStream, 
  160                    Size dInputStre am sizedTg aStream, H ashMap<Str ing, Strin g> hisChan ges)
  161                throws G enericDico mUtilities TextFileEx ception, 
  162                GenericD icomUtilit iesTextFil eExtractio nException , GenericD icomUtilit iesTGAFile Exception{
  163           
  164           ID icomDataSe t dds;
  165           Or iginalPixe lDataInfo  originalPi xelData =  new Origin alPixelDat aInfo();
  166           tr y{
  167                LOGGER.i nfo("Gener ic DICOM L ayer: Star t parsing  input stre ams ...");
  168                // Extra ct all DIC OM data fr om the Tex t file, bu ild datase t;
  169                LegacyTe xtFilePars er textPar ser = new  LegacyText FileParser ();
  170                Buffered Reader buf fer = new  BufferedRe ader(new I nputStream Reader(siz edTextStre am.getInSt ream()));
  171                dds = te xtParser.c reateDicom DataSet(bu ffer, orig inalPixelD ata);
  172  
  173                if(hisCh anges != n ull) { //  make sure  acquisitio nSite is e xtracted f rom update  section i f availabl e
  174                         String acq uisitionSi te = null;
  175                         if(hisChan ges.contai nsKey("003 2,1020")){
  176                             acquis itionSite  = (String) hisChanges .get("0032 ,1020");
  177                             dds.se tAcquisiti onSite(acq uisitionSi te);
  178                         }
  179                }
  180                //Invoke  the extra ction of p ixel data  from the T arga file.
  181                LegacyTG AFileParse r tgaParse r = new Le gacyTGAFil eParser();
  182                tgaParse r.updateDi comDataSet WithPixelD ata(dds, s izedTgaStr eam, origi nalPixelDa ta);
  183                LOGGER.i nfo("... G eneric DIC OM Layer:  Parsing in put stream s complete d.");
  184                // Extra ct the Vis ta HIS cha nges to th e generic  DicomDataS et object.   
  185                dds.upda teHISChang esToDDS(hi sChanges);
  186                
  187           }
  188           ca tch(TextFi leExtracti onExceptio n extract) {
  189                LOGGER.e rror("Erro r: " + ext ract.getMe ssage());
  190                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  191                throw ne w GenericD icomUtilit iesTextFil eExtractio nException (
  192                         "Failure t o assemble  Dicom Obj ect.", ext ract);
  193           }
  194           ca tch(TextFi leExceptio n e){
  195                LOGGER.e rror("Erro r: " + e.g etMessage( ));
  196                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  197                throw ne w GenericD icomUtilit iesTextFil eException (
  198                         "Failure t o assemble  Dicom Obj ect.", e);
  199           }
  200           ca tch(TGAFil eNotFoundE xception n otga){
  201                LOGGER.e rror("Erro r: " + not ga.getMess age());
  202                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  203                throw ne w GenericD icomUtilit iesTGAFile Exception(
  204                         "Failure t o assemble  Dicom Obj ect.", not ga);
  205           }
  206           ca tch(TGAFil eException  badtga){
  207                LOGGER.e rror("Erro r: " + bad tga.getMes sage());
  208                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  209                throw ne w GenericD icomUtilit iesTGAFile Exception(
  210                         "Failure t o assemble  Dicom Obj ect.", bad tga);
  211           }
  212           ca tch(DicomE xception d e){
  213                LOGGER.e rror("Erro r: " + de. getMessage ());
  214                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  215                throw ne w GenericD icomUtilit iesTGAFile Exception( "Failure t o assemble  Dicom Obj ect.", de) ;
  216           }
  217           re turn dds;
  218       }
  219  
  220           
  221       /* (no n-Javadoc)
  222            *  @see gov. va.med.ima ging.dicom .utilities .reconstit ution.IDic omReconstu tion#assem bleDicomSt ream(gov.v a.med.imag ing.SizedI nputStream , gov.va.m ed.imaging .SizedInpu tStream)
  223            * /
  224       public  byte[] as sembleDico mStream(Si zedInputSt ream sized TextStream
  225                    Size dInputStre am sizedTg aStream)
  226                throws G enericDico mUtilities TextFileNo tFoundExce ption, Gen ericDicomU tilitiesTe xtFileExce ption, 
  227                GenericD icomUtilit iesTextFil eExtractio nException , GenericD icomUtilit iesTGAFile Exception,
  228                GenericD icomUtilit iesTGAFile NotFoundEx ception{
  229           
  230           Ha shMap<Stri ng, String > hisChang es=null;
  231           ID icomDataSe t dds;
  232           Or iginalPixe lDataInfo  originalPi xelData =  new Origin alPixelDat aInfo();
  233           tr y{
  234                LOGGER.i nfo("Gener ic DICOM L ayer: Star t parsing  input stre ams ...");
  235                // Extra ct all DIC OM data fr om the Tex t file, bu ild datase t;
  236                // Make  sure ViX u pdates at  the end of  file are  processed  too
  237                LegacyTe xtFilePars er textPar ser = new  LegacyText FileParser ();
  238                Buffered Reader buf fer = new  BufferedRe ader(new I nputStream Reader(siz edTextStre am.getInSt ream()));
  239                dds = te xtParser.c reateDicom DataSet(bu ffer, orig inalPixelD ata);
  240                hisChang es=textPar ser.getHis Updates(bu ffer);
  241  
  242                if (hisC hanges!=nu ll) { // m ake sure a cquisition Site is ex tracted fr om update  section if  available
  243                         String acq uisitionSi te = null;
  244                         if(hisChan ges.contai nsKey("003 2,1020")){
  245                             acquis itionSite  = (String) hisChanges .get("0032 ,1020");
  246                             dds.se tAcquisiti onSite(acq uisitionSi te);
  247                         }
  248                }
  249                //Invoke  the extra ction of p ixel data  from the T arga file.
  250                LegacyTG AFileParse r tgaParse r = new Le gacyTGAFil eParser();
  251                tgaParse r.updateDi comDataSet WithPixelD ata(dds, s izedTgaStr eam, origi nalPixelDa ta);
  252                LOGGER.i nfo("... G eneric DIC OM Layer:  Parsing in put stream s complete d.");
  253                // Extra ct the Vis ta HIS cha nges to th e generic  DicomDataS et object.   
  254                if (hisC hanges!=nu ll)
  255                    dds. updateHISC hangesToDD S(hisChang es);
  256                
  257                return d ds.part10B uffer(fals e);
  258           }
  259           ca tch(TextFi leExtracti onExceptio n extract) {
  260                LOGGER.e rror("Erro r: " + ext ract.getMe ssage());
  261                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  262                throw ne w GenericD icomUtilit iesTextFil eExtractio nException (
  263                         "Failure t o assemble  Dicom Obj ect.", ext ract);
  264           }
  265           ca tch(TextFi leExceptio n e){
  266                LOGGER.e rror("Erro r: " + e.g etMessage( ));
  267                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  268                throw ne w GenericD icomUtilit iesTextFil eException (
  269                         "Failure t o assemble  Dicom Obj ect.", e);
  270           }
  271           ca tch(TGAFil eNotFoundE xception n otga){
  272                LOGGER.e rror("Erro r: " + not ga.getMess age());
  273                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  274                throw ne w GenericD icomUtilit iesTGAFile Exception(
  275                         "Failure t o assemble  Dicom Obj ect.", not ga);
  276           }
  277           ca tch(TGAFil eException  badtga){
  278                LOGGER.e rror("Erro r: " + bad tga.getMes sage());
  279                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  280                throw ne w GenericD icomUtilit iesTGAFile Exception(
  281                         "Failure t o assemble  Dicom Obj ect.", bad tga);
  282           }
  283           ca tch(DicomE xception d e){
  284                LOGGER.e rror("Erro r: " + de. getMessage ());
  285                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  286                throw ne w GenericD icomUtilit iesTGAFile Exception( "Failure t o assemble  Dicom Obj ect.", de) ;
  287           }
  288       }
  289  
  290  
  291  
  292       
  293       /* (no n-Javadoc)
  294            *  @see gov. va.med.ima ging.dicom .utilities .reconstit ution.IDic omReconstu tion#updat eDicomObje ct(java.la ng.String,  java.util .HashMap)
  295            * /
  296       public  IDicomDat aSet updat eDicomObje ct(String  dicomFile,  HashMap<S tring, Str ing> hisCh anges)
  297                             throws  GenericDi comReconst itutionExc eption {
  298           
  299           ID icomDataSe t dds = nu ll;
  300           Di comFileExt ractor fil eExtractor  = null;
  301           //  Add the V ista HIS c hanges to  the generi c DicomDat aSet objec t.  This i s done
  302           //  by callin g Csaba's  code.
  303           tr y{
  304                fileExtr actor = ne w DicomFil eExtractor ();
  305                dds = fi leExtracto r.getDDSFr omDicomFil e(dicomFil e);
  306                dds.upda teHISChang esToDDS(hi sChanges);
  307                
  308           }
  309           ca tch(DicomF ileExcepti on file){
  310                LOGGER.e rror(file. getMessage ());
  311                LOGGER.e rror(this. getClass() .getName()  + ": " +
  312                         "\nExcepti on thrown  while upda ting Dicom  Object.") ;
  313                throw ne w GenericD icomRecons titutionEx ception("F ailure to  update Dic om Object. ", file);
  314           }
  315           ca tch(DicomE xception d e){
  316                LOGGER.e rror(de.ge tMessage() );
  317                LOGGER.e rror(this. getClass() .getName()  + ": " +
  318                         "\nExcepti on thrown  while upda ting Dicom  Object.") ;
  319                throw ne w GenericD icomRecons titutionEx ception("F ailure to  update Dic om Object. ", de);
  320           }
  321           re turn dds;
  322       }
  323  
  324       
  325       /* (no n-Javadoc)
  326            *  @see gov. va.med.ima ging.dicom .utilities .reconstit ution.IDic omReconstu tion#updat eDicomObje ct(gov.va. med.imagin g.SizedInp utStream,  java.util. HashMap)
  327            * /
  328       public  IDicomDat aSet updat eDicomObje ct(SizedIn putStream  sizedDicom Stream, Ha shMap<Stri ng, String > hisChang es)
  329                             throws  GenericDi comReconst itutionExc eption {
  330  
  331           ID icomDataSe t dds;
  332           Di comFileExt ractor fil eExtractor ;
  333           tr y{
  334                fileExtr actor = ne w DicomFil eExtractor ();
  335                dds = fi leExtracto r.getDDSFr omDicomStr eam(sizedD icomStream );
  336                    dds. updateHISC hangesToDD S(hisChang es);             
  337           }
  338           ca tch(DicomF ileExcepti on file){
  339                LOGGER.e rror("Erro r: " + fil e.getMessa ge());
  340                LOGGER.e rror("Exce ption thro wn while u pdating Di com Stream .");
  341                throw ne w GenericD icomRecons titutionEx ception("F ailure to  update Dic om Stream. ", file);
  342           }
  343           ca tch(DicomE xception d e){
  344                LOGGER.e rror("Erro r: " + de. getMessage ());
  345                LOGGER.e rror("Exce ption thro wn while u pdating Di com Object .");
  346                throw ne w GenericD icomRecons titutionEx ception("F ailure to  update Dic om Stream. ", de);
  347           }
  348           re turn dds;
  349       }
  350  
  351  
  352       /* (no n-Javadoc)
  353            *  @see gov. va.med.ima ging.dicom .utilities .reconstit ution.IDic omReconstu tion#updat eDicomStre am(gov.va. med.imagin g.SizedInp utStream,  gov.va.med .imaging.S izedInputS tream)
  354            * /
  355       public  byte[] up dateDicomS tream(Size dInputStre am sizedDi comStream,  SizedInpu tStream si zedTextStr eam)
  356                             throws  GenericDi comReconst itutionExc eption {
  357  
  358           Ha shMap<Stri ng,String>  hisChange s=null;
  359           ID icomDataSe t dds;
  360           Di comFileExt ractor fil eExtractor ;
  361           // Add the Vi sta HIS ch anges to t he generic  DicomData Set object .  This is  done
  362           //  by callin g Csaba's  code.
  363           tr y{
  364                fileExtr actor = ne w DicomFil eExtractor ();
  365                dds = fi leExtracto r.getDDSFr omDicomStr eam(sizedD icomStream );
  366                // Extra ct all ViX  update da ta section  from the  Text file  and update
  367                // datas et with it ;
  368                LegacyTe xtFilePars er textPar ser = new  LegacyText FileParser ();
  369                hisChang es=textPar ser.extrac tHisUpdate sfromTextS tream(size dTextStrea m);
  370                if (hisC hanges!=nu ll)
  371                    dds. updateHISC hangesToDD S(hisChang es);
  372                
  373                return d ds.part10B uffer(true );
  374           }
  375           ca tch(DicomF ileExcepti on file){
  376                LOGGER.e rror("Erro r: " + fil e.getMessa ge());
  377                LOGGER.e rror("Exce ption thro wn while u pdating Di com Stream .");
  378                throw ne w GenericD icomRecons titutionEx ception("F ailure to  update Dic om Stream. ", file);
  379           }
  380           ca tch(DicomE xception d e){
  381                LOGGER.e rror("Erro r: " + de. getMessage ());
  382                LOGGER.e rror("Exce ption thro wn while u pdating Di com Object .");
  383                throw ne w GenericD icomRecons titutionEx ception("F ailure to  update Dic om Stream. ", de);
  384           }
  385           ca tch(TextFi leExtracti onExceptio n extract) {
  386                LOGGER.e rror("Erro r: " + ext ract.getMe ssage());
  387                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  388                throw ne w GenericD icomRecons titutionEx ception(
  389                         "Failure t o extract  HIS Update  data.", e xtract);
  390           }
  391           ca tch(TextFi leExceptio n e){
  392                LOGGER.e rror("Erro r: " + e.g etMessage( ));
  393                LOGGER.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  394                throw ne w GenericD icomRecons titutionEx ception(
  395                         "Failure t o handle T ext file f or HIS Upd ates.", e) ;
  396           }
  397  
  398       }
  399   }