X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Fio%2FWriter.js;h=9fe946d0ea2bd883e3e780b3400a0ab73ecc76ce;hp=1401dd29160dcb89471371295940e7b902a90bc5;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6 diff --git a/site/j2s/java/io/Writer.js b/site/j2s/java/io/Writer.js index 1401dd2..9fe946d 100644 --- a/site/j2s/java/io/Writer.js +++ b/site/j2s/java/io/Writer.js @@ -1,68 +1,68 @@ -Clazz.load(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){ -c$=Clazz.decorateAsClass(function(){ -this.lock=null; -Clazz.instantialize(this,arguments); -},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]); -Clazz.makeConstructor(c$, -function(){ -this.lock=this; -}); -Clazz.makeConstructor(c$, -function(lock){ -if(lock!=null){ -this.lock=lock; -}else{ -throw new NullPointerException(); -}},"~O"); -Clazz.defineMethod(c$,"write", -function(buf){ -this.write(buf,0,buf.length); -},"~A"); -Clazz.defineMethod(c$,"write", -function(oneChar){ -{ -var oneCharArray=Clazz.newArray(1,'\0'); -oneCharArray[0]=String.fromCharCode(oneChar); -this.write(oneCharArray); -}},"~N"); -Clazz.defineMethod(c$,"write", -function(str){ -var buf=Clazz.newArray(str.length,'\0'); -str.getChars(0,buf.length,buf,0); -{ -this.write(buf); -}},"~S"); -Clazz.defineMethod(c$,"write", -function(str,offset,count){ -if(count>=0){ -var buf=Clazz.newArray(count,'\0'); -str.getChars(offset,offset+count,buf,0); -{ -this.write(buf); -}}else{ -throw new StringIndexOutOfBoundsException(); -}},"~S,~N,~N"); -Clazz.defineMethod(c$,"append", -function(c){ -this.write(c.charCodeAt(0)); -return this; -},"~N"); -Clazz.defineMethod(c$,"append", -function(csq){ -if(null==csq){ -this.write("null"); -}else{ -this.write(csq.toString()); -}return this; -},"CharSequence"); -Clazz.defineMethod(c$,"append", -function(csq,start,end){ -if(null==csq){ -this.write("null".substring(start,end)); -}else{ -this.write(csq.subSequence(start,end).toString()); -}return this; -},"CharSequence,~N,~N"); -Clazz.defineStatics(c$, -"TOKEN_NULL","null"); -}); +Clazz.load(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){ +c$=Clazz.decorateAsClass(function(){ +this.lock=null; +Clazz.instantialize(this,arguments); +},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]); +Clazz.makeConstructor(c$, +function(){ +this.lock=this; +}); +Clazz.makeConstructor(c$, +function(lock){ +if(lock!=null){ +this.lock=lock; +}else{ +throw new NullPointerException(); +}},"~O"); +Clazz.defineMethod(c$,"write", +function(buf){ +this.write(buf,0,buf.length); +},"~A"); +Clazz.defineMethod(c$,"write", +function(oneChar){ +{ +var oneCharArray=Clazz.newArray(1,'\0'); +oneCharArray[0]=String.fromCharCode(oneChar); +this.write(oneCharArray); +}},"~N"); +Clazz.defineMethod(c$,"write", +function(str){ +var buf=Clazz.newArray(str.length,'\0'); +str.getChars(0,buf.length,buf,0); +{ +this.write(buf); +}},"~S"); +Clazz.defineMethod(c$,"write", +function(str,offset,count){ +if(count>=0){ +var buf=Clazz.newArray(count,'\0'); +str.getChars(offset,offset+count,buf,0); +{ +this.write(buf); +}}else{ +throw new StringIndexOutOfBoundsException(); +}},"~S,~N,~N"); +Clazz.defineMethod(c$,"append", +function(c){ +this.write(c.charCodeAt(0)); +return this; +},"~N"); +Clazz.defineMethod(c$,"append", +function(csq){ +if(null==csq){ +this.write("null"); +}else{ +this.write(csq.toString()); +}return this; +},"CharSequence"); +Clazz.defineMethod(c$,"append", +function(csq,start,end){ +if(null==csq){ +this.write("null".substring(start,end)); +}else{ +this.write(csq.subSequence(start,end).toString()); +}return this; +},"CharSequence,~N,~N"); +Clazz.defineStatics(c$, +"TOKEN_NULL","null"); +});