[libbluray-devel] Remove legacy code

hpi1 git at videolan.org
Thu Sep 13 14:25:07 CEST 2018


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Sep 13 15:23:24 2018 +0300| [a99a8e59bee9d66169bc3038a69419873b866719] | committer: hpi1

Remove legacy code

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=a99a8e59bee9d66169bc3038a69419873b866719
---

 src/libbluray/bdj/java/java/io/FileDescriptor.java  | 10 +---------
 src/libbluray/bdj/java/java/io/FileInputStream.java | 12 ------------
 2 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/src/libbluray/bdj/java/java/io/FileDescriptor.java b/src/libbluray/bdj/java/java/io/FileDescriptor.java
index 59a2c4fc..787b7360 100644
--- a/src/libbluray/bdj/java/java/io/FileDescriptor.java
+++ b/src/libbluray/bdj/java/java/io/FileDescriptor.java
@@ -28,19 +28,11 @@ public final class FileDescriptor {
     private int  fd;
     private long handle;
 
-    /* for files in BD VFS */
-    private long fp;
-
-    /* for files inside .jar */
-    protected InputStream slave;
-
     private int useCount;
 
     public FileDescriptor() {
 	fd = -1;
         handle = -1;
-        fp = 0;
-        slave = null;
         useCount = 0;
     }
 
@@ -54,7 +46,7 @@ public final class FileDescriptor {
     public static final FileDescriptor err = new FileDescriptor(2);
 
     public boolean valid() {
-	return (fd != -1) || (handle != -1) || (fp != 0) || (slave != null);
+	return (fd != -1) || (handle != -1);
     }
 
     public native void sync() throws SyncFailedException;
diff --git a/src/libbluray/bdj/java/java/io/FileInputStream.java b/src/libbluray/bdj/java/java/io/FileInputStream.java
index 33e868ec..32db2bd7 100644
--- a/src/libbluray/bdj/java/java/io/FileInputStream.java
+++ b/src/libbluray/bdj/java/java/io/FileInputStream.java
@@ -119,9 +119,6 @@ public class FileInputStream extends InputStream
     //public  native int  available() throws IOException;
 
     public int available() throws IOException {
-        if (fd != null && fd.slave != null) {
-            return fd.slave.available();
-        }
         return available;
     }
 
@@ -144,10 +141,6 @@ public class FileInputStream extends InputStream
             throw new IndexOutOfBoundsException();
         }
 
-        if (fd != null && fd.slave != null) {
-            return fd.slave.read(b, off, len);
-        }
-
         int r = readBytes(b, off, len);
         if (r != len) {
             available = 0;
@@ -174,11 +167,6 @@ public class FileInputStream extends InputStream
         available = 0;
 
         if (fd != null) {
-            if (fd.slave != null) {
-                fd.slave.close();
-                return;
-            }
-
             int n = fd.decrementAndGetUseCount();
             if (n > 0 && !force) {
                 return;



More information about the libbluray-devel mailing list