equal
deleted
inserted
replaced
95 dst.put((char) cp); |
95 dst.put((char) cp); |
96 } else if (Character.isValidCodePoint(cp)) { |
96 } else if (Character.isValidCodePoint(cp)) { |
97 if (dst.remaining() < 2) |
97 if (dst.remaining() < 2) |
98 return CoderResult.OVERFLOW; |
98 return CoderResult.OVERFLOW; |
99 mark += 4; |
99 mark += 4; |
100 dst.put(Surrogate.high(cp)); |
100 dst.put(Character.highSurrogate(cp)); |
101 dst.put(Surrogate.low(cp)); |
101 dst.put(Character.lowSurrogate(cp)); |
102 } else { |
102 } else { |
103 return CoderResult.malformedForLength(4); |
103 return CoderResult.malformedForLength(4); |
104 } |
104 } |
105 } |
105 } |
106 return CoderResult.UNDERFLOW; |
106 return CoderResult.UNDERFLOW; |