de.intarsys.tools.jaxb.HexBytesAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
package de.intarsys.tools.jaxb;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import de.intarsys.tools.hex.HexTools;
/**
* Convert a hex string notation to a char[]
*
*/
public class HexBytesAdapter extends XmlAdapter {
@Override
public String marshal(byte[] v) throws Exception {
return HexTools.bytesToHexString(v);
}
@Override
public byte[] unmarshal(String v) throws Exception {
return HexTools.hexStringToBytes(v);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy