Yes, and kind of no.
"Kind of no" in the sense that QR code and Data Matrix both
fundamentally treat their payload as text. QR code's 'byte mode' is
actually supposed to be interpreted as ISO-8859-1 text by default (or
another encoding if so signaled). "Kind of no" in the sense that
readers will invariably attempt to construe the payload as text.
But, if you have a custom reader that is aware of what you're doing --
yes. For example, you can put your custom payload in a "byte mode"
segment in a QR code. When you decode with this library, call
Result.getResultMetadata() on the result. This is a Hashtable. Look up
what is mapped to key ResultMetadataType.BYTE_SEGMENTS. This is a
Vector of byte[], containing the bytes in each byte segment in the
code. This is your payload that you can do with as you like.