83 lines
2.7 KiB
Java
83 lines
2.7 KiB
Java
/*
|
|
* 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);
|
|
}
|
|
}
|
|
|