while (count < utfSize) {
if ((out[s] = (char) buf[offset + count++]) < '\u0080')
s++;
else if (((a = out[s]) & 0xe0) == 0xc0) {
if (count >= utfSize)
throw new UTFDataFormatException(Msg.getString("K0062",
count));
int b = buf[count++];
if ((b & 0xC0) != 0x80)
throw new UTFDataFormatException(Msg.getString("K0062",
(count - 1)));
out[s++] = (char) (((a & 0x1F) << 6) | (b & 0x3F));
} else if ((a & 0xf0) == 0xe0) {
if (count + 1 >= utfSize)
throw new UTFDataFormatException(Msg.getString("K0063",
(count + 1)));
int b = buf[count++];
int c = buf[count++];
if (((b & 0xC0) != 0x80) || ((c & 0xC0) != 0x80))
throw new UTFDataFormatException(Msg.getString("K0064",
(count - 2)));
out[s++] = (char) (((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F));
} else {
throw new UTFDataFormatException(Msg.getString("K0065",
(count - 1)));
}
}
return new String(out, 0, s);
}