import org.apache.commons.lang.ArrayUtils; import java.nio.charset.Charset; /** * 字节数组转换工具类 */ public class BytesUtils { public static final String GBK = "GBK"; public static final String UTF8 = "utf-8"; public static final char[] asci…
Encoding类 表示字符编码 1.字符串转换成字节数组byte[] using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FileStreamTest { class Program { static void Main(string[] args) {…