Java数组将字节[]转换为字符[]。编码是UTF16
我需要在Java中将byte[]转换为char[]。 使用的Unicode编码是UTF-16
简而言之,我需要一个c#的Java等价物
UnicodeEncoding.Unicode.GetChars(byte[] bytes);
另外,我只需要将byte[]的一部分转换为char[]
public virtual char[] GetChars(byte[] bytes, int index, int count);
你可以在下面搜索框中键入要查询的问题!
我需要在Java中将byte[]转换为char[]。 使用的Unicode编码是UTF-16
简而言之,我需要一个c#的Java等价物
UnicodeEncoding.Unicode.GetChars(byte[] bytes);
另外,我只需要将byte[]的一部分转换为char[]
public virtual char[] GetChars(byte[] bytes, int index, int count);
# 1 楼答案
# 2 楼答案
C#API:
爪哇:
返回char[]的Java方法:
C#API:
爪哇:
# 3 楼答案
你可以试试这个:
从^{}