From 446619dc77b0b97523070a40ec1efa6001abdb9f Mon Sep 17 00:00:00 2001 From: Lynn Rozen Date: Mon, 26 Jun 2023 10:47:35 +0300 Subject: [PATCH] Revert "Add inputstream class (#28)" This reverts commit b8b6038381e2d31906692575c772259fc18babb9. --- .../io/lakefs/iceberg/LakeFSInputFile.java | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/src/main/java/io/lakefs/iceberg/LakeFSInputFile.java b/src/main/java/io/lakefs/iceberg/LakeFSInputFile.java index 2f67e76..471220e 100644 --- a/src/main/java/io/lakefs/iceberg/LakeFSInputFile.java +++ b/src/main/java/io/lakefs/iceberg/LakeFSInputFile.java @@ -3,9 +3,6 @@ import org.apache.iceberg.io.InputFile; import org.apache.iceberg.io.SeekableInputStream; -import java.io.IOException; -import static java.util.Objects.requireNonNull; - public class LakeFSInputFile implements InputFile { private final InputFile wrapped; @@ -26,44 +23,11 @@ public long getLength(){ @Override public SeekableInputStream newStream(){ - return new LakeFSInputStream(wrapped.newStream()); + return wrapped.newStream(); } @Override public boolean exists(){ return wrapped.exists(); } - - private static class LakeFSInputStream extends SeekableInputStream { - private final SeekableInputStream wrapped; - - public LakeFSInputStream(SeekableInputStream wrapped) { - this.wrapped = requireNonNull(wrapped, "wrapped is null"); - } - - @Override - public int read() throws IOException { - return wrapped.read(); - } - - @Override - public int read(byte[] b, int off, int len) throws IOException { - return wrapped.read(b, off, len); - } - - @Override - public long getPos() throws IOException { - return wrapped.getPos(); - } - - @Override - public void seek(long newPos) throws IOException { - wrapped.seek(newPos); - } - - @Override - public void close() throws IOException { - wrapped.close(); - } - } }