i must write a "Data Matrix" with "Base 256" and Hex. How can i encode with xing. I need perhaps an example.
cu Achim
You don't have to write anything in hex. It's only in the documentation for clarification of the data stream which has to be encoded. The string with the data should contain the byte values not the hex values. As far as I can see you do it already in your code.
The error correction ECC200 is the standard mode for data matrix. Nothing to do at this point.
"Base256" is one of the encodation modes for Data Matrix.
You can set it with the encoding hint DATA_MATRIX_DEFAULT_ENCODATION.
In your code the line
hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);
doesn't have any effect for Data Matrix.
Replace it with
hintMap.put(EncodeHintType.DATA_MATRIX_DEFAULT_ENCODATION, Encodation.BASE256);
I'm not sure why you use the following line in your code:
b.append(qrCodeData);
In my opinion you should directly encode the string daten1.