1:
8:
9: package ;
10:
11:
15:
16: public class Input_ASCII extends BytesToUnicode
17: {
18: public String getName() { return "ASCII"; }
19:
20: public int read (char[] outbuffer, int outpos, int count)
21: {
22: int origpos = outpos;
23:
24: int inpos = this.inpos;
25: byte[] inbuffer = this.inbuffer;
26: int inavail = this.inlength - inpos;
27: int outavail = count;
28: if (outavail > inavail)
29: outavail = inavail;
30: while (--outavail >= 0)
31: {
32: outbuffer[outpos++] = (char) (inbuffer[inpos++] & 0x7f);
33: }
34: this.inpos = inpos;
35: return outpos - origpos;
36: }
37: }