Example #1
0
 public static CharBuffer Wrap(string str)
 {
     CharBuffer buffer = new CharBuffer ();
     buffer.Wrapped = str;
     return buffer;
 }
Example #2
0
        /// <exception cref="Mp3net.Helpers.CharacterCodingException"></exception>
        internal static byte[] CharBufferToBytes(CharBuffer charBuffer, string 
			characterSet)
        {
            Encoding charset = Mp3net.Helpers.Extensions.GetEncoding(characterSet);
            CharsetEncoder encoder = charset.NewEncoder();
            ByteBuffer byteBuffer = encoder.Encode(charBuffer);
            return BufferTools.CopyBuffer(((byte[])byteBuffer.Array()), 0, byteBuffer.Limit()
                );
        }