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