home *** CD-ROM | disk | FTP | other *** search
- package java.io;
-
- import java.util.Enumeration;
- import java.util.Vector;
-
- public class SequenceInputStream extends InputStream {
- // $FF: renamed from: e java.util.Enumeration
- Enumeration field_0;
- // $FF: renamed from: in java.io.InputStream
- InputStream field_1;
-
- public SequenceInputStream(Enumeration var1) {
- this.field_0 = var1;
-
- try {
- this.nextStream();
- } catch (IOException var2) {
- throw new Error("panic");
- }
- }
-
- public SequenceInputStream(InputStream var1, InputStream var2) {
- Vector var3 = new Vector(2);
- var3.addElement(var1);
- var3.addElement(var2);
- this.field_0 = var3.elements();
-
- try {
- this.nextStream();
- } catch (IOException var4) {
- throw new Error("panic");
- }
- }
-
- final void nextStream() throws IOException {
- if (this.field_1 != null) {
- this.field_1.close();
- }
-
- this.field_1 = this.field_0.hasMoreElements() ? (InputStream)this.field_0.nextElement() : null;
- }
-
- public int available() throws IOException {
- return this.field_1 == null ? 0 : this.field_1.available();
- }
-
- public int read() throws IOException {
- if (this.field_1 == null) {
- return -1;
- } else {
- int var1 = this.field_1.read();
- if (var1 == -1) {
- this.nextStream();
- return this.read();
- } else {
- return var1;
- }
- }
- }
-
- public int read(byte[] var1, int var2, int var3) throws IOException {
- if (this.field_1 == null) {
- return -1;
- } else if (var3 == 0) {
- return 0;
- } else {
- int var4 = this.field_1.read(var1, var2, var3);
- if (var4 <= 0) {
- this.nextStream();
- return this.read(var1, var2, var3);
- } else {
- return var4;
- }
- }
- }
-
- public void close() throws IOException {
- do {
- this.nextStream();
- } while(this.field_1 != null);
-
- }
- }
-