282930313233343536
* @throws TranscodeException * */ public static final int getLen(int ch) throws TranscodeException{ if (ch>=128) throw new TranscodeException("Invalid UCS char for ASCII format"); else return 1; }
6970717273747576
* */ public static final void encodeAndWrite(OutputStream os, int ch) throws IOException, TranscodeException { if (ch>=128) throw new TranscodeException("Invalid UCS char for ASCII format"); os.write(ch); }
2324252627282930
import com.ximpleware.TranscodeException; public class ISO8859_1Coder { public static int getLen(int ch) throws TranscodeException{ if (ch>255) throw new TranscodeException("Invalid UCS char for ASCII format"); return 1; }
5758596061626364
* */ public static final void encodeAndWrite(OutputStream os, int ch) throws IOException, TranscodeException { if (ch>255) throw new TranscodeException("Invalid UCS char for ISO-8859-1 format"); os.write(ch); }