Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative of DatatypeConverter.printHexBinary(byte[] array) and DatatypeConverter.parseHexBinary(String str) in Android

what are the alternative of DatatypeConverter.printHexBinary(byte[] array) and DatatypeConverter.parseHexBinary(String str) in Android. Android don't have classDef of java.xml.bind.DatatypeConverter...

like image 749
Engr Zee Avatar asked Jan 01 '13 11:01

Engr Zee


People also ask

What is Javax XML bind DatatypeConverter?

It defines static parse and print methods that provide access to a JAXB provider's implementation of parse and print methods. The static methods defined in the class can also be used to specify a parse or a print method in a javaType binding declaration.

What is parseHexBinary?

parseHexBinary(String lexicalXSDHexBinary) Converts the string argument into an array of bytes. static int. parseInt(String lexicalXSDInt) Convert the string argument into an int value.


1 Answers

You are probably better off using the hexadecimal encoding/decoding found in the Apache commons codec library. Please make sure you are using the correct version of the library though, for more information look here

like image 161
Maarten Bodewes Avatar answered Sep 19 '22 19:09

Maarten Bodewes