home *** CD-ROM | disk | FTP | other *** search
- package animationlib;
-
- import java.io.IOException;
- import java.io.InputStream;
-
- public class SwappedDataInputStream extends InputStream {
- // $FF: renamed from: is java.io.InputStream
- InputStream field_0;
- long pos;
-
- public SwappedDataInputStream(InputStream var1) {
- this.field_0 = var1;
- }
-
- public long curPos() {
- return this.pos;
- }
-
- public int read() throws IOException {
- int var1 = this.field_0.read();
- if (var1 < 0) {
- return -1;
- } else {
- ++this.pos;
- return var1;
- }
- }
-
- public int read(byte[] var1) throws IOException {
- return this.read(var1, 0, var1.length);
- }
-
- public int read(byte[] var1, int var2, int var3) throws IOException {
- int var4 = this.field_0.read(var1, var2, var3);
- if (var4 < 0) {
- return -1;
- } else {
- this.pos += (long)var4;
- return var4;
- }
- }
-
- public short readShort() throws IOException {
- byte[] var1 = new byte[]{0, 0};
- short var2 = 255;
- short var3 = 0;
- int var4 = this.read(var1, 0, 2);
- if (var4 < 2) {
- throw new IOException();
- } else {
- var3 = (short)(var3 | (short)var1[1] << 8);
- var3 = (short)(var3 | (short)var1[0] & var2);
- return var3;
- }
- }
-
- public int readInt() throws IOException {
- byte[] var1 = new byte[]{0, 0, 0, 0};
- short var2 = 255;
- int var3 = 0;
- int var4 = this.read(var1, 0, 4);
- if (var4 < 4) {
- throw new IOException();
- } else {
- var3 |= ((short)var1[3] & var2) << 24;
- var3 |= ((short)var1[2] & var2) << 16;
- var3 |= ((short)var1[1] & var2) << 8;
- var3 |= (short)var1[0] & var2;
- return var3;
- }
- }
-
- public int available() throws IOException {
- return this.field_0.available();
- }
-
- public void close() throws IOException {
- this.field_0.close();
- }
-
- public void mark(int var1) {
- this.field_0.mark(var1);
- }
-
- public boolean markSupported() {
- return this.field_0.markSupported();
- }
-
- public void reset() throws IOException {
- this.field_0.reset();
- this.pos = 0L;
- }
-
- public long skip(long var1) throws IOException {
- long var3 = this.field_0.skip(var1);
- this.pos += var3;
- return var3;
- }
- }
-