internal protected override CoderResult encodeLoop (CharBuffer @in, ByteBuffer @out) { int char_count = @in.remaining (); int byte_count = @out.capacity (); if (char_count < 1) return CoderResult.UNDERFLOW; char[] chars = new char [char_count]; @in.get (chars, 0, char_count); byte[] bytes = new byte [byte_count]; int bytes_used, chars_used; bool completed; encoder.Convert ( chars, 0, char_count, bytes, 0, byte_count, false, out chars_used, out bytes_used, out completed); if (chars_used != char_count) return CoderResult.OVERFLOW; @out.put (bytes, 0, bytes_used); return CoderResult.UNDERFLOW; }
/// <summary> /// Relative bulk <i>put</i> method <i>(optional operation)</i>. /// </summary> public CharBuffer put(CharBuffer src) { return default(CharBuffer); }