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