public int read(CharBuffer target) throws IOException {int remaining = remaining();if (target == this) {if (remaining == 0) {return -1;}throw new IllegalArgumentException();}if (remaining == 0) {return limit > 0 && target.remaining() == 0 ? 0 : -1;}remaining = Math.min(target.remaining(), remaining);if (remaining > 0) {char[] chars = new char[remaining];get(chars);target.put(chars);}return remaining;}

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;}
