1 Clazz.load(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){
\r
2 c$=Clazz.decorateAsClass(function(){
\r
4 Clazz.instantialize(this,arguments);
\r
5 },java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);
\r
6 Clazz.makeConstructor(c$,
\r
10 Clazz.makeConstructor(c$,
\r
15 throw new NullPointerException();
\r
17 Clazz.defineMethod(c$,"write",
\r
19 this.write(buf,0,buf.length);
\r
21 Clazz.defineMethod(c$,"write",
\r
24 var oneCharArray=Clazz.newArray(1,'\0');
\r
25 oneCharArray[0]=String.fromCharCode(oneChar);
\r
26 this.write(oneCharArray);
\r
28 Clazz.defineMethod(c$,"write",
\r
30 var buf=Clazz.newArray(str.length,'\0');
\r
31 str.getChars(0,buf.length,buf,0);
\r
35 Clazz.defineMethod(c$,"write",
\r
36 function(str,offset,count){
\r
38 var buf=Clazz.newArray(count,'\0');
\r
39 str.getChars(offset,offset+count,buf,0);
\r
43 throw new StringIndexOutOfBoundsException();
\r
45 Clazz.defineMethod(c$,"append",
\r
47 this.write(c.charCodeAt(0));
\r
50 Clazz.defineMethod(c$,"append",
\r
55 this.write(csq.toString());
\r
58 Clazz.defineMethod(c$,"append",
\r
59 function(csq,start,end){
\r
61 this.write("null".substring(start,end));
\r
63 this.write(csq.subSequence(start,end).toString());
\r
65 },"CharSequence,~N,~N");
\r
66 Clazz.defineStatics(c$,
\r
67 "TOKEN_NULL","null");
\r