public class CharToByteASCII extends CharToByteConverter {
private char highHalfZoneCode;
public String getCharacterEncoding() {
return "ASCII";
}
public int flush(byte[] var1, int var2, int var3) throws MalformedInputException {
if (this.highHalfZoneCode != 0) {
this.highHalfZoneCode = 0;
throw new MalformedInputException("String ends with <High Half Zone code> of UTF16");
} else {
super.byteOff = super.charOff = 0;
return 0;
}
}
public int convert(char[] var1, int var2, int var3, byte[] var4, int var5, int var6) throws MalformedInputException, UnknownCharacterException, ConversionBufferFullException {
byte[] var9 = new byte[1];
super.charOff = var2;
super.byteOff = var5;
if (this.highHalfZoneCode != 0) {
char var14 = this.highHalfZoneCode;
this.highHalfZoneCode = 0;
if (var1[var2] >= '\udc00' && var1[var2] <= '\udfff') {
super.badInputLength = 1;
throw new UnknownCharacterException();
} else {
super.badInputLength = 0;
throw new MalformedInputException("Previous converted string ends with <High Half Zone Code> of UTF16 , but this string is not begin with <Low Half Zone>");