link start!
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.file.zip;
|
||||
|
||||
import javax.baja.file.BIFileStore;
|
||||
import javax.baja.file.BLocalFileStore;
|
||||
import javax.baja.file.BSubSpaceFile;
|
||||
import javax.baja.file.zip.BZipSpace;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.space.BSpace;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BZipFile
|
||||
extends BSubSpaceFile {
|
||||
private static final BIcon icon = BIcon.std("files/zip.png");
|
||||
public static final Type TYPE;
|
||||
BZipSpace zipSpace;
|
||||
static /* synthetic */ Class class$javax$baja$file$zip$BZipFile;
|
||||
|
||||
public boolean isModified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected BSpace doOpen() {
|
||||
if (this.zipSpace == null) {
|
||||
this.zipSpace = new BZipSpace(this);
|
||||
}
|
||||
return this.zipSpace;
|
||||
}
|
||||
|
||||
protected void doSave() throws Exception {
|
||||
}
|
||||
|
||||
/*
|
||||
* WARNING - Removed back jump from a try to a catch block - possible behaviour change.
|
||||
* Enabled aggressive block sorting
|
||||
* Enabled unnecessary exception pruning
|
||||
* Enabled aggressive exception aggregation
|
||||
*/
|
||||
protected void doClose() {
|
||||
if (this.zipSpace == null) return;
|
||||
try {
|
||||
this.zipSpace.close();
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
Object var2_2 = null;
|
||||
this.zipSpace = null;
|
||||
throw throwable;
|
||||
}
|
||||
{
|
||||
Object var2_3 = null;
|
||||
this.zipSpace = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasNavChildren() {
|
||||
return this.getStore() instanceof BLocalFileStore;
|
||||
}
|
||||
|
||||
public BZipSpace getZipSpace() {
|
||||
return (BZipSpace)this.getSubSpace();
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return "application/zip";
|
||||
}
|
||||
|
||||
public BOrd getNavOrd() {
|
||||
if (this.getStore() instanceof BLocalFileStore) {
|
||||
return BOrd.make(super.getNavOrd(), "zip:");
|
||||
}
|
||||
return super.getNavOrd();
|
||||
}
|
||||
|
||||
public BIcon getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public BZipFile(BIFileStore bIFileStore) {
|
||||
super(bIFileStore);
|
||||
}
|
||||
|
||||
public BZipFile() {
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$file$zip$BZipFile;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$file$zip$BZipFile = BZipFile.class("[Ljavax.baja.file.zip.BZipFile;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.baja.nre.util.SortUtil
|
||||
*/
|
||||
package javax.baja.file.zip;
|
||||
|
||||
import java.util.HashMap;
|
||||
import javax.baja.file.BAbstractFileStore;
|
||||
import javax.baja.file.BDirectory;
|
||||
import javax.baja.file.BIFile;
|
||||
import javax.baja.file.FilePath;
|
||||
import javax.baja.file.zip.BZipSpace;
|
||||
import javax.baja.nre.util.SortUtil;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BZipFileDirectory
|
||||
extends BAbstractFileStore {
|
||||
public static final Type TYPE;
|
||||
private HashMap byName;
|
||||
private BIFile[] byList;
|
||||
static /* synthetic */ Class class$javax$baja$file$zip$BZipFileDirectory;
|
||||
|
||||
BDirectory getOrMakeDir(String string) {
|
||||
BDirectory bDirectory = (BDirectory)this.byName.get(string);
|
||||
if (bDirectory == null) {
|
||||
BZipSpace bZipSpace = (BZipSpace)this.getFileSpace();
|
||||
FilePath filePath = this.getFilePath().merge(string);
|
||||
BZipFileDirectory bZipFileDirectory = new BZipFileDirectory(bZipSpace, filePath);
|
||||
bDirectory = new BDirectory(bZipFileDirectory);
|
||||
this.byName.put(string, bDirectory);
|
||||
}
|
||||
return bDirectory;
|
||||
}
|
||||
|
||||
BIFile get(String string) {
|
||||
return (BIFile)this.byName.get(string);
|
||||
}
|
||||
|
||||
BIFile[] list() {
|
||||
if (this.byList == null) {
|
||||
this.byList = this.byName.values().toArray(new BIFile[this.byName.size()]);
|
||||
SortUtil.sort((Object[])this.byList);
|
||||
}
|
||||
return this.byList;
|
||||
}
|
||||
|
||||
void add(BIFile bIFile) {
|
||||
this.byName.put(bIFile.getFileName(), bIFile);
|
||||
}
|
||||
|
||||
public boolean isDirectory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isReadonly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private final /* synthetic */ void this() {
|
||||
this.byName = new HashMap();
|
||||
this.byList = null;
|
||||
}
|
||||
|
||||
public BZipFileDirectory(BZipSpace bZipSpace, FilePath filePath) {
|
||||
super(bZipSpace, filePath);
|
||||
this.this();
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$file$zip$BZipFileDirectory;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$file$zip$BZipFileDirectory = BZipFileDirectory.class("[Ljavax.baja.file.zip.BZipFileDirectory;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.file.zip;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import javax.baja.file.BAbstractFileStore;
|
||||
import javax.baja.file.FilePath;
|
||||
import javax.baja.file.zip.BZipSpace;
|
||||
import javax.baja.sys.BAbsTime;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BZipFileEntry
|
||||
extends BAbstractFileStore {
|
||||
public static final Type TYPE;
|
||||
ZipEntry zipEntry;
|
||||
BAbsTime modified;
|
||||
static /* synthetic */ Class class$javax$baja$file$zip$BZipFileEntry;
|
||||
|
||||
public ZipEntry getZipEntry() {
|
||||
return this.zipEntry;
|
||||
}
|
||||
|
||||
public boolean isDirectory() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isReadonly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public long getSize() {
|
||||
return this.zipEntry.getSize();
|
||||
}
|
||||
|
||||
public BAbsTime getLastModified() {
|
||||
if (this.modified == null) {
|
||||
this.modified = BAbsTime.make(this.zipEntry.getTime());
|
||||
}
|
||||
return this.modified;
|
||||
}
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
BZipSpace bZipSpace = (BZipSpace)this.getFileSpace();
|
||||
return bZipSpace.getZip().getInputStream(this.zipEntry);
|
||||
}
|
||||
|
||||
public long getCrc() throws IOException {
|
||||
return this.zipEntry.getCrc();
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.zipEntry.hashCode();
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public BZipFileEntry(BZipSpace bZipSpace, FilePath filePath, ZipEntry zipEntry) {
|
||||
super(bZipSpace, filePath);
|
||||
this.zipEntry = zipEntry;
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$file$zip$BZipFileEntry;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$file$zip$BZipFileEntry = BZipFileEntry.class("[Ljavax.baja.file.zip.BZipFileEntry;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.file.zip;
|
||||
|
||||
import javax.baja.file.zip.BZipFile;
|
||||
import javax.baja.file.zip.BZipSpace;
|
||||
import javax.baja.file.zip.ZipPath;
|
||||
import javax.baja.naming.BOrdScheme;
|
||||
import javax.baja.naming.InvalidOrdBaseException;
|
||||
import javax.baja.naming.OrdQuery;
|
||||
import javax.baja.naming.OrdTarget;
|
||||
import javax.baja.naming.SyntaxException;
|
||||
import javax.baja.naming.UnresolvedException;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BZipScheme
|
||||
extends BOrdScheme {
|
||||
public static final BZipScheme INSTANCE = new BZipScheme();
|
||||
public static final Type TYPE;
|
||||
static /* synthetic */ Class class$javax$baja$file$zip$BZipScheme;
|
||||
|
||||
public OrdQuery parse(String string) {
|
||||
return new ZipPath(this.getId(), string);
|
||||
}
|
||||
|
||||
public OrdTarget resolve(OrdTarget ordTarget, OrdQuery ordQuery) throws SyntaxException, UnresolvedException {
|
||||
ZipPath zipPath = (ZipPath)ordQuery;
|
||||
String string = zipPath.getBody();
|
||||
if (ordTarget.get() instanceof BZipFile) {
|
||||
BZipFile bZipFile = (BZipFile)ordTarget.get();
|
||||
BZipSpace bZipSpace = (BZipSpace)bZipFile.open();
|
||||
if (string.equals("") || string.equals("/")) {
|
||||
return new OrdTarget(ordTarget, bZipSpace);
|
||||
}
|
||||
return new OrdTarget(ordTarget, (BObject)((Object)bZipSpace.resolveFile(zipPath)));
|
||||
}
|
||||
if (ordTarget.get() instanceof BZipSpace) {
|
||||
BZipSpace bZipSpace = (BZipSpace)ordTarget.get();
|
||||
if (string.equals("") || string.equals("/")) {
|
||||
return new OrdTarget(ordTarget, bZipSpace);
|
||||
}
|
||||
return new OrdTarget(ordTarget, (BObject)((Object)bZipSpace.resolveFile(zipPath)));
|
||||
}
|
||||
throw new InvalidOrdBaseException(ordTarget.get().getType().toString());
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private BZipScheme() {
|
||||
super("zip");
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$file$zip$BZipScheme;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$file$zip$BZipScheme = BZipScheme.class("[Ljavax.baja.file.zip.BZipScheme;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.file.zip;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
import javax.baja.file.BDirectory;
|
||||
import javax.baja.file.BFileSpace;
|
||||
import javax.baja.file.BIDirectory;
|
||||
import javax.baja.file.BIFile;
|
||||
import javax.baja.file.BIFileStore;
|
||||
import javax.baja.file.BLocalFileStore;
|
||||
import javax.baja.file.FilePath;
|
||||
import javax.baja.file.zip.BZipFile;
|
||||
import javax.baja.file.zip.BZipFileDirectory;
|
||||
import javax.baja.file.zip.BZipFileEntry;
|
||||
import javax.baja.file.zip.ZipPath;
|
||||
import javax.baja.log.Log;
|
||||
import javax.baja.naming.BHost;
|
||||
import javax.baja.naming.BISession;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.nav.BINavNode;
|
||||
import javax.baja.space.BSpace;
|
||||
import javax.baja.sys.BajaRuntimeException;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BZipSpace
|
||||
extends BFileSpace
|
||||
implements BIDirectory {
|
||||
public static final Type TYPE;
|
||||
static final Log log;
|
||||
BSpace parentSpace;
|
||||
BOrd ordInSession;
|
||||
private ZipFile zip;
|
||||
BZipFile bZipFile;
|
||||
BDirectory roots;
|
||||
boolean isModule;
|
||||
static /* synthetic */ Class class$javax$baja$file$zip$BZipSpace;
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
ZipFile getZip() {
|
||||
if (this.zip == null && this.bZipFile != null) {
|
||||
this.zip = BZipSpace.open(this.bZipFile.getStore());
|
||||
}
|
||||
return this.zip;
|
||||
}
|
||||
|
||||
/*
|
||||
* WARNING - Removed back jump from a try to a catch block - possible behaviour change.
|
||||
* Enabled aggressive block sorting
|
||||
* Enabled unnecessary exception pruning
|
||||
* Enabled aggressive exception aggregation
|
||||
*/
|
||||
void close() {
|
||||
try {
|
||||
try {
|
||||
this.zip.close();
|
||||
}
|
||||
catch (IOException iOException) {
|
||||
throw new BajaRuntimeException(iOException);
|
||||
}
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
Object var2_3 = null;
|
||||
this.zip = null;
|
||||
throw throwable;
|
||||
}
|
||||
{
|
||||
Object var2_4 = null;
|
||||
this.zip = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static ZipFile open(BIFileStore bIFileStore) {
|
||||
try {
|
||||
if (bIFileStore instanceof BLocalFileStore) {
|
||||
File file = ((BLocalFileStore)bIFileStore).getLocalFile();
|
||||
return new ZipFile(file);
|
||||
}
|
||||
throw new IllegalStateException("Only BLocalFileStore supported");
|
||||
}
|
||||
catch (IOException iOException) {
|
||||
throw new BajaRuntimeException(iOException);
|
||||
}
|
||||
}
|
||||
|
||||
public BDirectory makeDir(FilePath filePath, Context context) throws IOException {
|
||||
throw new IOException("ZipSpace is readonly");
|
||||
}
|
||||
|
||||
public BIFile makeFile(FilePath filePath, Context context) throws IOException {
|
||||
throw new IOException("ZipSpace is readonly");
|
||||
}
|
||||
|
||||
public void move(FilePath filePath, FilePath filePath2, Context context) throws IOException {
|
||||
throw new IOException("ZipSpace is readonly");
|
||||
}
|
||||
|
||||
public void delete(FilePath filePath, Context context) throws IOException {
|
||||
throw new IOException("ZipSpace is readonly");
|
||||
}
|
||||
|
||||
public BIFile[] listFiles() {
|
||||
return this.getChildren(this.roots());
|
||||
}
|
||||
|
||||
public BIFile findFile(FilePath filePath) {
|
||||
BIFile bIFile = this.roots();
|
||||
int n = 0;
|
||||
while (n < filePath.depth()) {
|
||||
if ((bIFile = this.getChild(bIFile, filePath.nameAt(n))) == null) {
|
||||
return null;
|
||||
}
|
||||
++n;
|
||||
}
|
||||
return bIFile;
|
||||
}
|
||||
|
||||
public BIFileStore findStore(FilePath filePath) {
|
||||
BIFile bIFile = this.findFile(filePath);
|
||||
if (bIFile == null) {
|
||||
return null;
|
||||
}
|
||||
return bIFile.getStore();
|
||||
}
|
||||
|
||||
public BIFile getChild(BIFile bIFile, String string) {
|
||||
BIFileStore bIFileStore = bIFile.getStore();
|
||||
if (bIFileStore instanceof BZipFileDirectory) {
|
||||
BZipFileDirectory bZipFileDirectory = (BZipFileDirectory)bIFileStore;
|
||||
return bZipFileDirectory.get(string);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public BIFile[] getChildren(BIFile bIFile) {
|
||||
BIFileStore bIFileStore = bIFile.getStore();
|
||||
if (bIFileStore instanceof BZipFileDirectory) {
|
||||
BZipFileDirectory bZipFileDirectory = (BZipFileDirectory)bIFileStore;
|
||||
return bZipFileDirectory.list();
|
||||
}
|
||||
return new BIFile[0];
|
||||
}
|
||||
|
||||
protected BOrd appendFilePathToOrd(BOrd bOrd, FilePath filePath) {
|
||||
if (bOrd == null) {
|
||||
return null;
|
||||
}
|
||||
if (bOrd.toString().length() == 0) {
|
||||
return BOrd.make(filePath);
|
||||
}
|
||||
return BOrd.make(bOrd, filePath);
|
||||
}
|
||||
|
||||
public BOrd getOrdInSession() {
|
||||
return this.ordInSession;
|
||||
}
|
||||
|
||||
public String getNavDescription(Context context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean hasNavChildren() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public BINavNode getNavChild(String string) {
|
||||
return this.getChild(this.roots(), string);
|
||||
}
|
||||
|
||||
public BINavNode[] getNavChildren() {
|
||||
return this.listFiles();
|
||||
}
|
||||
|
||||
private final synchronized BDirectory roots() {
|
||||
if (this.roots != null) {
|
||||
return this.roots;
|
||||
}
|
||||
this.roots = new BDirectory(new BZipFileDirectory(this, (FilePath)new ZipPath("/")));
|
||||
try {
|
||||
Enumeration<? extends ZipEntry> enumeration = this.zip.entries();
|
||||
while (enumeration.hasMoreElements()) {
|
||||
ZipEntry zipEntry = enumeration.nextElement();
|
||||
if (zipEntry.isDirectory()) continue;
|
||||
String string = zipEntry.getName().replace('\\', '/');
|
||||
if (this.isModule && (string.endsWith(".class") || string.endsWith(".properties") || string.startsWith("META-INF/") || string.startsWith("meta-inf/"))) continue;
|
||||
ZipPath zipPath = new ZipPath("/" + string);
|
||||
BZipFileEntry bZipFileEntry = new BZipFileEntry(this, zipPath, zipEntry);
|
||||
BIFile bIFile = this.makeFile(bZipFileEntry);
|
||||
BDirectory bDirectory = this.mapToDirectory(zipPath);
|
||||
BZipFileDirectory bZipFileDirectory = (BZipFileDirectory)bDirectory.getStore();
|
||||
bZipFileDirectory.add(bIFile);
|
||||
}
|
||||
}
|
||||
catch (Exception exception) {
|
||||
log.error("Loading zip: " + this.zip, exception);
|
||||
}
|
||||
return this.roots;
|
||||
}
|
||||
|
||||
public BHost getHost() {
|
||||
return this.parentSpace == null ? null : this.parentSpace.getHost();
|
||||
}
|
||||
|
||||
public BISession getSession() {
|
||||
return this.parentSpace == null ? null : this.parentSpace.getSession();
|
||||
}
|
||||
|
||||
private final BDirectory mapToDirectory(FilePath filePath) {
|
||||
BDirectory bDirectory = this.roots;
|
||||
int n = 0;
|
||||
while (n < filePath.depth() - 1) {
|
||||
BZipFileDirectory bZipFileDirectory = (BZipFileDirectory)bDirectory.getStore();
|
||||
bDirectory = bZipFileDirectory.getOrMakeDir(filePath.nameAt(n));
|
||||
++n;
|
||||
}
|
||||
return bDirectory;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public BZipSpace(BZipFile bZipFile) {
|
||||
super("zip");
|
||||
this.parentSpace = bZipFile.getSpace();
|
||||
this.ordInSession = bZipFile.getOrdInSession();
|
||||
this.bZipFile = bZipFile;
|
||||
this.zip = BZipSpace.open(bZipFile.getStore());
|
||||
}
|
||||
|
||||
public BZipSpace(BOrd bOrd, ZipFile zipFile) {
|
||||
super("zip");
|
||||
this.ordInSession = bOrd;
|
||||
this.zip = zipFile;
|
||||
boolean bl = false;
|
||||
if (bOrd.toString().indexOf("module:") >= 0) {
|
||||
bl = true;
|
||||
}
|
||||
this.isModule = bl;
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$file$zip$BZipSpace;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$file$zip$BZipSpace = BZipSpace.class("[Ljavax.baja.file.zip.BZipSpace;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
log = Log.getLog("file");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.file.zip;
|
||||
|
||||
import javax.baja.file.FilePath;
|
||||
import javax.baja.naming.OrdQueryList;
|
||||
|
||||
public class ZipPath
|
||||
extends FilePath {
|
||||
protected FilePath newInstance(String string) {
|
||||
return new ZipPath(this.getScheme(), string);
|
||||
}
|
||||
|
||||
public void normalize(OrdQueryList ordQueryList, int n) {
|
||||
if (ordQueryList.isSameScheme(n, n + 1)) {
|
||||
FilePath filePath = (FilePath)ordQueryList.get(n + 1);
|
||||
ordQueryList.merge(n, this.merge(filePath));
|
||||
}
|
||||
}
|
||||
|
||||
public ZipPath(String string, String string2) {
|
||||
super(string, string2);
|
||||
}
|
||||
|
||||
public ZipPath(String string) {
|
||||
this("zip", string);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user