text: public virtual int read(java.nio.CharBuffer target){int remaining_1 = remaining();if (target == this){if (remaining_1 == 0){return -1;}throw new System.ArgumentException();}if (remaining_1 == 0){return _limit > 0 && target.remaining() == 0 ? 0 : -1;}remaining_1 = System.Math.Min(target.remaining(), remaining_1);if (remaining_1 > 0){char[] chars = new char[remaining_1];get(chars);target.put(chars);}return remaining_1;}