Produced by Araxis Merge on 12/13/2018 10:35:32 AM Eastern 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 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\util | EncoderDecoderUtil.java | Fri Dec 7 17:36:24 2018 UTC |
| 2 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\util | EncoderDecoderUtil.java | Wed Dec 12 22:26:42 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 136 |
| 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 2007 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | ||
| 5 | package go v.va.med.f w.util; | |
| 6 | ||
| 7 | import org .apache.co mmons.code c.BinaryDe coder; | |
| 8 | import org .apache.co mmons.code c.BinaryEn coder; | |
| 9 | import org .apache.co mmons.code c.DecoderE xception; | |
| 10 | import org .apache.co mmons.code c.EncoderE xception; | |
| 11 | import org .apache.co mmons.lang .Validate; | |
| 12 | import org .springfra mework.ste reotype.Co mponent; | |
| 13 | ||
| 14 | import gov .va.med.fw .service.A bstractCom ponent; | |
| 15 | ||
| 16 | /** | |
| 17 | * Initial javadoc f or class E ncoderDeco derUtil. T ODO - Add content he re | |
| 18 | * | |
| 19 | * Created Apr 18, 2 007 2:59:3 3 PM | |
| 20 | * | |
| 21 | * DNS | |
| 22 | */ | |
| 23 | @Component | |
| 24 | public cla ss Encoder DecoderUti l extends AbstractCo mponent { | |
| 25 | pr ivate Bina ryEncoder encoder; | |
| 26 | pr ivate Bina ryDecoder decoder; | |
| 27 | ||
| 28 | pu blic Encod erDecoderU til() { | |
| 29 | enco der = new org.apache .commons.c odec.binar y.Base64() ; | |
| 30 | deco der = new org.apache .commons.c odec.binar y.Base64() ; | |
| 31 | } | |
| 32 | ||
| 33 | pu blic Strin g encode(b yte[] rawD ata) { | |
| 34 | try { | |
| 35 | return new Strin g(encoder. encode(raw Data)); | |
| 36 | } ca tch (Encod erExceptio n e) { | |
| 37 | throw new Illega lArgumentE xception(" Unable to encode arg ument: " + rawData); | |
| 38 | } | |
| 39 | } | |
| 40 | ||
| 41 | pu blic byte[ ] decode(S tring enco dedData) { | |
| 42 | try { | |
| 43 | return decoder.d ecode(enco dedData.ge tBytes()); | |
| 44 | } ca tch (Decod erExceptio n e) { | |
| 45 | throw new Illega lArgumentE xception(" Unable to decode arg ument: " + encodedDa ta); | |
| 46 | } | |
| 47 | } | |
| 48 | ||
| 49 | pu blic Binar yDecoder g etDecoder( ) { | |
| 50 | retu rn decoder ; | |
| 51 | } | |
| 52 | ||
| 53 | pu blic void setDecoder (BinaryDec oder decod er) { | |
| 54 | this .decoder = decoder; | |
| 55 | } | |
| 56 | ||
| 57 | pu blic Binar yEncoder g etEncoder( ) { | |
| 58 | retu rn encoder ; | |
| 59 | } | |
| 60 | ||
| 61 | pu blic void setEncoder (BinaryEnc oder encod er) { | |
| 62 | this .encoder = encoder; | |
| 63 | } | |
| 64 | ||
| 65 | pu blic void afterPrope rtiesSet() { | |
| 66 | Vali date.notNu ll(encoder , "encoder is null") ; | |
| 67 | Vali date.notNu ll(decoder , "decoder is null") ; | |
| 68 | } | |
| 69 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.