1234567891011121314151617181920212223242526272829303132333435363738 |
- package gnu.gcj.convert;
- public class Input_ASCII extends BytesToUnicode
- {
- public String getName() { return "ASCII"; }
- public int read (char[] outbuffer, int outpos, int count)
- {
- int origpos = outpos;
-
- int inpos = this.inpos;
- byte[] inbuffer = this.inbuffer;
- int inavail = this.inlength - inpos;
- int outavail = count;
- if (outavail > inavail)
- outavail = inavail;
- while (--outavail >= 0)
- {
- outbuffer[outpos++] = (char) (inbuffer[inpos++] & 0x7f);
- }
- this.inpos = inpos;
- return outpos - origpos;
- }
- }
|