My question is if there is any short way to convert a String to a byte-Array using standard java-library-functions? The "string" does have NO ENCODING, the string itself is a string for no reason, but it is the way I get it. I did not code it myself and I cannot change it, but I have to deal with it. A standard String.getBytes()
will not work because some values always get "?"-ed out and make the underlying binary-data obviously useless.
Any ideas?
It's basically the same question as here: How do I get a consistent byte representation of strings in C# without manually specifying an encoding? but instead of C# for Java. I searched quite some time but I couldn't find any fitting solution.
Thanks in advance.