1 Clazz.load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
2 c$ = Clazz.decorateAsClass (function () {
7 Clazz.instantialize (this, arguments);
8 }, java.io, "ByteArrayInputStream", java.io.InputStream);
9 Clazz.makeConstructor (c$,
11 Clazz.superConstructor (this, java.io.ByteArrayInputStream, []);
14 this.count = buf.length;
16 Clazz.overrideMethod (c$, "readByteAsInt",
18 return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;
20 Clazz.overrideMethod (c$, "read",
21 function (b, off, len) {
23 throw new NullPointerException ();
25 if (arguments.length == 1) { off = 0; len = b.length; }
27 if (off < 0 || len < 0 || len > b.length - off) {
28 throw new IndexOutOfBoundsException ();
29 }if (this.pos >= this.count) {
31 }var avail = this.count - this.pos;
36 }System.arraycopy (this.buf, this.pos, b, off, len);
40 Clazz.overrideMethod (c$, "skip",
42 var k = this.count - this.pos;
48 Clazz.overrideMethod (c$, "available",
50 return this.count - this.pos;
52 Clazz.overrideMethod (c$, "markSupported",
56 Clazz.overrideMethod (c$, "mark",
57 function (readAheadLimit) {
58 this.$mark = this.pos;
60 Clazz.overrideMethod (c$, "resetStream",
63 Clazz.overrideMethod (c$, "reset",
65 this.pos = this.$mark;
67 Clazz.overrideMethod (c$, "close",