How can I check whether a byte array contains a Unicode string in Java?

前端 未结 7 1242
再見小時候
再見小時候 2021-02-19 04:14

Given a byte array that is either a UTF-8 encoded string or arbitrary binary data, what approaches can be used in Java to determine which it is?

The arr

7条回答
提交回复
热议问题