otob 转换为字节组
2022-12-22 15:49:15 最后更新
用法:
//将文件转换为字节组,字节组将为字符串形式返回赋值给“b”
s b = otob("%abc.txt")
syso(b)

//将字符串转换为字节组
s b = otob("utf-8", "nihao")
syso(b)

//不设置编码
s b = otob(null, "nihao")

//将文件转换成 byte[] 字节数组对象
byte[] b = otob("file", null, "%abc.txt")
syso(b)

//将字符串转换成 byte[] 字节数组对象
byte[] b = otob("str", "utf-8", "nihao")
syso(b)

说明:
将字符或文件转换为字节组