Remove legacy code
This commit is contained in:
parent
f5dd832d57
commit
a99a8e59be
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue