// 1111110x
_code = b & 0x01;
_moreBytes = 5;
return read2();
} else {
throw new CharConversionException("Invalid UTF-8 Encoding");
}
} else { // No more bytes in buffer.
if (_inputStream == null)
throw new IOException("No input stream or stream closed");
_start = 0;
_end = _inputStream.read(_bytes, 0, _bytes.length);
if (_end > 0) {
return read2(); // Continues.
} else { // Done.
if (_moreBytes == 0) {
return -1;
} else { // Incomplete sequence.
throw new CharConversionException(
"Unexpected end of stream");
}
}
}
}