导航菜单

页面标题

页面副标题

BAM Crawford v6.14.1 - l.java 源代码

正在查看: BAM Crawford v6.14.1 应用的 l.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package u1;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.ProcessingInstruction;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

public abstract class l {

    private static final Object f15111a = new Object();

    private static DocumentBuilderFactory f15112b = a();

    private static DocumentBuilderFactory a() {
        DocumentBuilderFactory newInstance = DocumentBuilderFactory.newInstance();
        newInstance.setNamespaceAware(true);
        newInstance.setIgnoringComments(true);
        try {
            newInstance.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", true);
            newInstance.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
            newInstance.setFeature("http://xml.org/sax/features/external-general-entities", false);
            newInstance.setFeature("http://xerces.apache.org/xerces2-j/features.html#disallow-doctype-decl", false);
            newInstance.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
            newInstance.setFeature("http://xerces.apache.org/xerces2-j/features.html#external-parameter-entities", false);
            newInstance.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
            newInstance.setXIncludeAware(false);
            newInstance.setExpandEntityReferences(false);
        } catch (Exception unused) {
        }
        return newInstance;
    }

    private static Object[] b(Node node, boolean z10, Object[] objArr) {
        NodeList childNodes = node.getChildNodes();
        for (int i10 = 0; i10 < childNodes.getLength(); i10++) {
            Node item = childNodes.item(i10);
            if (7 == item.getNodeType()) {
                ProcessingInstruction processingInstruction = (ProcessingInstruction) item;
                if ("xpacket".equals(processingInstruction.getTarget())) {
                    if (objArr != null) {
                        objArr[2] = processingInstruction.getData();
                    }
                }
            }
            if (3 != item.getNodeType() && 7 != item.getNodeType()) {
                String namespaceURI = item.getNamespaceURI();
                String localName = item.getLocalName();
                if (("xmpmeta".equals(localName) || "xapmeta".equals(localName)) && "adobe:ns:meta/".equals(namespaceURI)) {
                    return b(item, false, objArr);
                }
                if (!z10 && "RDF".equals(localName) && "http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI)) {
                    if (objArr != null) {
                        objArr[0] = item;
                        objArr[1] = f15111a;
                    }
                    return objArr;
                }
                Object[] b10 = b(item, z10, objArr);
                if (b10 != null) {
                    return b10;
                }
            }
        }
        return null;
    }

    public static t1.d c(Object obj, w1.d dVar) {
        e.b(obj);
        if (dVar == null) {
            dVar = new w1.d();
        }
        Object[] b10 = b(e(obj, dVar), dVar.l(), new Object[3]);
        if (b10 == null || b10[1] != f15111a) {
            return new k();
        }
        k i10 = f.i((Node) b10[0]);
        i10.b((String) b10[2]);
        return !dVar.k() ? o.h(i10, dVar) : i10;
    }

    private static Document d(InputSource inputSource) {
        try {
            DocumentBuilder newDocumentBuilder = f15112b.newDocumentBuilder();
            newDocumentBuilder.setErrorHandler(null);
            return newDocumentBuilder.parse(inputSource);
        } catch (IOException e10) {
            throw new t1.b("Error reading the XML-file", 204, e10);
        } catch (ParserConfigurationException e11) {
            throw new t1.b("XML Parser not correctly configured", 0, e11);
        } catch (SAXException e12) {
            throw new t1.b("XML parsing failure", 201, e12);
        }
    }

    private static Document e(Object obj, w1.d dVar) {
        return obj instanceof InputStream ? g((InputStream) obj, dVar) : obj instanceof byte[] ? f(new a((byte[]) obj), dVar) : h((String) obj, dVar);
    }

    private static Document f(a aVar, w1.d dVar) {
        InputSource inputSource = new InputSource(aVar.f());
        try {
            if (dVar.i()) {
                try {
                    f15112b.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
                } catch (Throwable unused) {
                }
            }
            return d(inputSource);
        } catch (t1.b e10) {
            if (e10.a() != 201 && e10.a() != 204) {
                throw e10;
            }
            if (dVar.h()) {
                aVar = d.a(aVar);
            }
            if (!dVar.j()) {
                return d(new InputSource(aVar.f()));
            }
            try {
                return d(new InputSource(new b(new InputStreamReader(aVar.f(), aVar.g()))));
            } catch (UnsupportedEncodingException unused2) {
                throw new t1.b("Unsupported Encoding", 9, e10);
            }
        }
    }

    private static Document g(InputStream inputStream, w1.d dVar) {
        if (!dVar.h() && !dVar.j()) {
            return d(new InputSource(inputStream));
        }
        try {
            return f(new a(inputStream), dVar);
        } catch (IOException e10) {
            throw new t1.b("Error reading the XML-file", 204, e10);
        }
    }

    private static Document h(String str, w1.d dVar) {
        new InputSource(new StringReader(str));
        try {
            if (dVar.i()) {
                try {
                    f15112b.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
                } catch (Throwable unused) {
                }
            }
            return d(new InputSource(new StringReader(str)));
        } catch (t1.b e10) {
            if (e10.a() == 201 && dVar.j()) {
                return d(new InputSource(new b(new StringReader(str))));
            }
            throw e10;
        }
    }
}