public static byte[] GetBytesForString(string str, Charset charset) { MonoCharset mono_set = (MonoCharset)charset; return(mono_set.Encoding.GetBytes(str)); }
public static string GetStringForBytes(byte[] buffer, int offset, int count, Charset charset) { MonoCharset mono_set = (MonoCharset)charset; return(mono_set.Encoding.GetString(buffer, offset, count)); }