Exemplo n.º 1
0
 private static ByteArrayBuffer Encode(Encoding charset, string @string)
 {
     ByteBuffer encoded = charset.Encode(CharBuffer.Wrap(@string));
     ByteArrayBuffer bab = new ByteArrayBuffer(encoded.Remaining());
     bab.Append(((byte[])encoded.Array()), encoded.Position(), encoded.Remaining());
     return bab;
 }