Converting a Hex String to an image file [duplicate]
问题 This question already has answers here : Convert a string representation of a hex dump to a byte array using Java? (24 answers) Closed 3 years ago . I have a requirement to read a Hex String with leading zeros which represents a JPEG file, from an xml file received and save it as an image file. The image data looks like 0000005000000050FF191818FF151715FF111413FF0E1...........................FF2A2322FF292221 In xml file The length of String between the tag is 51216 I read the Hex data in