Abhinaya has Published 61 Articles

How to convert a byte array to a hex string in Java?

Abhinaya

Abhinaya

Updated on 30-Jul-2019 22:30:20

380 Views

The printHexBinary() method of the DatatypeConverter class accepts a byte array and returns a hex string.Exampleimport javax.xml.bind.DatatypeConverter; public class ByteToHexString { public static void main(String args[]) { String sam = "Hello how are you how do you do"; ... Read More

Previous 1 ... 3 4 5 6 7
Advertisements