Clazz.load(["java.io.InputStream"],"java.io.StringBufferInputStream",["java.lang.ArrayIndexOutOfBoundsException","$.NullPointerException"],function(){ c$=Clazz.decorateAsClass(function(){ this.buffer=null; this.count=0; this.pos=0; Clazz.instantialize(this,arguments); },java.io,"StringBufferInputStream",java.io.InputStream); Clazz.makeConstructor(c$, function(str){ Clazz.superConstructor(this,java.io.StringBufferInputStream,[]); if(str!=null){ this.buffer=str; this.count=str.length; }else{ throw new NullPointerException(); }},"~S"); Clazz.overrideMethod(c$,"available", function(){ return this.count-this.pos; }); Clazz.defineMethod(c$,"read", function(){ return this.pos=this.count){ return-1; }if(b!=null){ if(0<=offset&&offset<=b.length&&0<=length&&length<=b.length-offset){ if(length==0){ return 0; }var copylen=this.count-this.pos