1 Clazz.load(["java.io.Reader"],"java.io.CharArrayReader",["java.io.IOException","java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException"],function(){
2 c$=Clazz.decorateAsClass(function(){
7 Clazz.instantialize(this,arguments);
8 },java.io,"CharArrayReader",java.io.Reader);
9 Clazz.makeConstructor(c$,
11 Clazz.superConstructor(this,java.io.CharArrayReader,[buf]);
13 this.count=buf.length;
15 Clazz.makeConstructor(c$,
16 function(buf,offset,length){
17 Clazz.superConstructor(this,java.io.CharArrayReader,[buf]);
18 if(0<=offset&&offset<=buf.length&&length>=0){
21 this.count=this.pos+length<buf.length?length:buf.length;
23 throw new IllegalArgumentException();
25 Clazz.overrideMethod(c$,"close",
31 Clazz.defineMethod(c$,"isOpen",
33 return this.buf!=null;
34 },$fz.isPrivate=true,$fz));
35 Clazz.overrideMethod(c$,"mark",
39 this.markedPos=this.pos;
41 throw new java.io.IOException(("K0060"));
43 Clazz.overrideMethod(c$,"markSupported",
47 Clazz.defineMethod(c$,"read",
51 if(this.pos!=this.count){
52 return this.buf[this.pos++];
54 }throw new java.io.IOException(("K0060"));
56 Clazz.defineMethod(c$,"read",
57 function(buffer,offset,len){
58 if(0<=offset&&offset<=buffer.length&&0<=len&&len<=buffer.length-offset){
61 if(this.pos<this.count){
62 var bytesRead=this.pos+len>this.count?this.count-this.pos:len;
63 System.arraycopy(this.buf,this.pos,buffer,offset,bytesRead);
67 }throw new java.io.IOException(("K0060"));
68 }}throw new ArrayIndexOutOfBoundsException();
70 Clazz.overrideMethod(c$,"ready",
74 return this.pos!=this.count;
75 }throw new java.io.IOException(("K0060"));
77 Clazz.overrideMethod(c$,"reset",
81 this.pos=this.markedPos!=-1?this.markedPos:0;
83 throw new java.io.IOException(("K0060"));
85 Clazz.overrideMethod(c$,"skip",
92 if(n<this.count-this.pos){
96 skipped=this.count-this.pos;
99 }throw new java.io.IOException(("K0060"));