1 Clazz.load(["java.io.InputStream"],"java.io.StringBufferInputStream",["java.lang.ArrayIndexOutOfBoundsException","$.NullPointerException"],function(){
\r
2 c$=Clazz.decorateAsClass(function(){
\r
6 Clazz.instantialize(this,arguments);
\r
7 },java.io,"StringBufferInputStream",java.io.InputStream);
\r
8 Clazz.makeConstructor(c$,
\r
10 Clazz.superConstructor(this,java.io.StringBufferInputStream,[]);
\r
13 this.count=str.length;
\r
15 throw new NullPointerException();
\r
17 Clazz.overrideMethod(c$,"available",
\r
19 return this.count-this.pos;
\r
21 Clazz.defineMethod(c$,"read",
\r
23 return this.pos<this.count?(this.buffer.charAt(this.pos++)).charCodeAt(0)&0xFF:-1;
\r
25 Clazz.defineMethod(c$,"read",
\r
26 function(b,offset,length){
\r
27 if(this.pos>=this.count){
\r
30 if(0<=offset&&offset<=b.length&&0<=length&&length<=b.length-offset){
\r
33 }var copylen=this.count-this.pos<length?this.count-this.pos:length;
\r
34 for(var i=0;i<copylen;i++){
\r
35 b[offset+i]=(this.buffer.charAt(this.pos+i)).charCodeAt(0);
\r
39 }throw new ArrayIndexOutOfBoundsException();
\r
40 }throw new NullPointerException(("K0047"));
\r
42 Clazz.overrideMethod(c$,"reset",
\r
46 Clazz.overrideMethod(c$,"skip",
\r
51 if(this.count-this.pos<n){
\r
52 numskipped=this.count-this.pos;
\r
53 this.pos=this.count;
\r