test/sun/nio/cs/OLD/DoubleByteEncoder.java
Print this page
@@ -24,11 +24,10 @@
*/
/*
*/
-//package sun.nio.cs.ext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
@@ -93,11 +92,11 @@
int dl = dst.arrayOffset() + dst.limit();
try {
while (sp < sl) {
char c = sa[sp];
- if (Surrogate.is(c)) {
+ if (Character.isSurrogate(c)) {
if (sgp.parse(c, sa, sp, sl) < 0)
return sgp.error();
if (sl - sp < 2)
return CoderResult.UNDERFLOW;
char c2 = sa[sp + 1];
@@ -151,11 +150,11 @@
int mark = src.position();
try {
while (src.hasRemaining()) {
char c = src.get();
- if (Surrogate.is(c)) {
+ if (Character.isSurrogate(c)) {
int surr;
if ((surr = sgp.parse(c, src)) < 0)
return sgp.error();
char c2 = Surrogate.low(surr);
byte[] outputBytes = new byte[2];