public void handleEncodingError(String errortype) { for (int i = 0; i < input_sequence_length; ++ i) { // remember to mask for sign-extension widening outputChar[i] = (char)(0xdc00 + (inbuffer[inbufferpos + i] & 0xff)); } // Kuhn actually recommends output sequence of 1 byte here, but this is // inconsistent with his other advice about lossless error encoding output_sequence_length = input_sequence_length; super.handleEncodingError(errortype); }
if (converter.missing_bytes() > 0) { converter.handleEncodingError("Premature end of input stream during " + converter.getCharacterEncoding() + " sequence");