File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
src/main/java/de/rub/nds/modifiablevariable/util Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * ModifiableVariable - A Variable Concept for Runtime Modifications
3
+ *
4
+ * Copyright 2014-2017 Ruhr University Bochum / Hackmanit GmbH
5
+ *
6
+ * Licensed under Apache License 2.0
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ */
9
+ package de .rub .nds .modifiablevariable .util ;
10
+
11
+ import javax .xml .bind .annotation .adapters .XmlAdapter ;
12
+
13
+ /**
14
+ *
15
+ */
16
+ public class UnformattedByteArrayAdapter extends XmlAdapter <String , byte []> {
17
+
18
+ @ Override
19
+ public byte [] unmarshal (String value ) {
20
+
21
+ value = value .replaceAll ("\\ s" , "" );
22
+ return ArrayConverter .hexStringToByteArray (value );
23
+ }
24
+
25
+ @ Override
26
+ public String marshal (byte [] value ) {
27
+ return ArrayConverter .bytesToHexString (value , false , false );
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments