示例#1
0
 public static string FromNetworkBytes(Stream s)
 {
     byte[] stringArray = SerializedArray.FromNetworkBytes(s);
     return(System.Text.Encoding.UTF8.GetString(stringArray, 0, stringArray.Length));
 }
示例#2
0
 public static byte[] ToNetworkBytes(string str)
 {
     byte[] encodedString = System.Text.Encoding.UTF8.GetBytes(str);
     return(SerializedArray.ToNetworkBytes(encodedString));
 }