jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UTF8Reader.java
equal
deleted
inserted
replaced
527 return out - offset; |
527 return out - offset; |
528 } |
528 } |
529 invalidByte(4, 4, b2); |
529 invalidByte(4, 4, b2); |
530 } |
530 } |
531 |
531 |
|
532 // check if output buffer is large enough to hold 2 surrogate chars |
|
533 if (out + 1 >= ch.length) { |
|
534 fBuffer[0] = (byte)b0; |
|
535 fBuffer[1] = (byte)b1; |
|
536 fBuffer[2] = (byte)b2; |
|
537 fBuffer[3] = (byte)b3; |
|
538 fOffset = 4; |
|
539 return out - offset; |
|
540 } |
|
541 |
532 // decode bytes into surrogate characters |
542 // decode bytes into surrogate characters |
533 int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003); |
543 int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003); |
534 if (uuuuu > 0x10) { |
544 if (uuuuu > 0x10) { |
535 invalidSurrogate(uuuuu); |
545 invalidSurrogate(uuuuu); |
536 } |
546 } |