X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Fio%2FCharArrayReader.js;h=5822a5e915a9362a87b9b416d9e8c9f81f8d0b47;hp=58b094cb01a037698d7fde3b0458945107ba7647;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/java/io/CharArrayReader.js b/site/j2s/java/io/CharArrayReader.js index 58b094c..5822a5e 100644 --- a/site/j2s/java/io/CharArrayReader.js +++ b/site/j2s/java/io/CharArrayReader.js @@ -1,101 +1,101 @@ -Clazz.load(["java.io.Reader"],"java.io.CharArrayReader",["java.io.IOException","java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException"],function(){ -c$=Clazz.decorateAsClass(function(){ -this.buf=null; -this.pos=0; -this.markedPos=-1; -this.count=0; -Clazz.instantialize(this,arguments); -},java.io,"CharArrayReader",java.io.Reader); -Clazz.makeConstructor(c$, -function(buf){ -Clazz.superConstructor(this,java.io.CharArrayReader,[buf]); -this.buf=buf; -this.count=buf.length; -},"~A"); -Clazz.makeConstructor(c$, -function(buf,offset,length){ -Clazz.superConstructor(this,java.io.CharArrayReader,[buf]); -if(0<=offset&&offset<=buf.length&&length>=0){ -this.buf=buf; -this.pos=offset; -this.count=this.pos+lengththis.count?this.count-this.pos:len; -System.arraycopy(this.buf,this.pos,buffer,offset,bytesRead); -this.pos+=bytesRead; -return bytesRead; -}return-1; -}throw new java.io.IOException(("K0060")); -}}throw new ArrayIndexOutOfBoundsException(); -},"~A,~N,~N"); -Clazz.overrideMethod(c$,"ready", -function(){ -{ -if(this.isOpen()){ -return this.pos!=this.count; -}throw new java.io.IOException(("K0060")); -}}); -Clazz.overrideMethod(c$,"reset", -function(){ -{ -if(this.isOpen()){ -this.pos=this.markedPos!=-1?this.markedPos:0; -}else{ -throw new java.io.IOException(("K0060")); -}}}); -Clazz.overrideMethod(c$,"skip", -function(n){ -{ -if(this.isOpen()){ -if(n<=0){ -return 0; -}var skipped=0; -if(n=0){ +this.buf=buf; +this.pos=offset; +this.count=this.pos+lengththis.count?this.count-this.pos:len; +System.arraycopy(this.buf,this.pos,buffer,offset,bytesRead); +this.pos+=bytesRead; +return bytesRead; +}return-1; +}throw new java.io.IOException(("K0060")); +}}throw new ArrayIndexOutOfBoundsException(); +},"~A,~N,~N"); +Clazz.overrideMethod(c$,"ready", +function(){ +{ +if(this.isOpen()){ +return this.pos!=this.count; +}throw new java.io.IOException(("K0060")); +}}); +Clazz.overrideMethod(c$,"reset", +function(){ +{ +if(this.isOpen()){ +this.pos=this.markedPos!=-1?this.markedPos:0; +}else{ +throw new java.io.IOException(("K0060")); +}}}); +Clazz.overrideMethod(c$,"skip", +function(n){ +{ +if(this.isOpen()){ +if(n<=0){ +return 0; +}var skipped=0; +if(n