1 Clazz.load(["java.io.Writer"],"java.io.CharArrayWriter",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.NullPointerException","$.StringIndexOutOfBoundsException"],function(){
\r
2 c$=Clazz.decorateAsClass(function(){
\r
5 Clazz.instantialize(this,arguments);
\r
6 },java.io,"CharArrayWriter",java.io.Writer);
\r
7 Clazz.makeConstructor(c$,
\r
9 Clazz.superConstructor(this,java.io.CharArrayWriter);
\r
10 this.buf=Clazz.newArray(32,'\0');
\r
13 Clazz.makeConstructor(c$,
\r
14 function(initialSize){
\r
15 Clazz.superConstructor(this,java.io.CharArrayWriter);
\r
17 this.buf=Clazz.newArray(initialSize,'\0');
\r
20 throw new IllegalArgumentException(("K005e"));
\r
22 Clazz.overrideMethod(c$,"close",
\r
25 Clazz.defineMethod(c$,"expand",
\r
27 if(this.count+i<=this.buf.length){
\r
29 }var newbuf=Clazz.newArray(this.buf.length+(2*i),'\0');
\r
30 System.arraycopy(this.buf,0,newbuf,0,this.count);
\r
32 },$fz.isPrivate=true,$fz),"~N");
\r
33 Clazz.overrideMethod(c$,"flush",
\r
36 Clazz.defineMethod(c$,"reset",
\r
41 Clazz.defineMethod(c$,"size",
\r
46 Clazz.defineMethod(c$,"toCharArray",
\r
49 var result=Clazz.newArray(this.count,'\0');
\r
50 System.arraycopy(this.buf,0,result,0,this.count);
\r
53 Clazz.overrideMethod(c$,"toString",
\r
56 return String.instantialize(this.buf,0,this.count);
\r
58 Clazz.defineMethod(c$,"write",
\r
59 function(c,offset,len){
\r
60 if(0<=offset&&offset<=c.length&&0<=len&&len<=c.length-offset){
\r
63 System.arraycopy(c,offset,this.buf,this.count,len);
\r
66 throw new IndexOutOfBoundsException();
\r
68 Clazz.defineMethod(c$,"write",
\r
72 this.buf[this.count++]=String.fromCharCode(oneChar);
\r
74 Clazz.defineMethod(c$,"write",
\r
75 function(str,offset,len){
\r
77 throw new NullPointerException(("K0047"));
\r
78 }if(0<=offset&&offset<=str.length&&0<=len&&len<=str.length-offset){
\r
81 str.getChars(offset,offset+len,this.buf,this.count);
\r
84 throw new StringIndexOutOfBoundsException();
\r
86 Clazz.defineMethod(c$,"writeTo",
\r
89 out.write(this.buf,0,this.count);
\r
90 }},"java.io.Writer");
\r
91 Clazz.defineMethod(c$,"append",
\r
93 this.write(c.charCodeAt(0));
\r
96 Clazz.defineMethod(c$,"append",
\r
99 this.append("null",0,"null".length);
\r
101 this.append(csq,0,csq.length());
\r
104 Clazz.defineMethod(c$,"append",
\r
105 function(csq,start,end){
\r
108 }var output=csq.subSequence(start,end).toString();
\r
109 this.write(output,0,output.length);
\r
111 },"CharSequence,~N,~N");
\r