0N/A/*
0N/A * reserved comment block
0N/A * DO NOT REMOVE OR ALTER!
0N/A */
0N/A/*
0N/A * Copyright 1999-2004 The Apache Software Foundation.
0N/A *
0N/A * Licensed under the Apache License, Version 2.0 (the "License");
0N/A * you may not use this file except in compliance with the License.
0N/A * You may obtain a copy of the License at
0N/A *
0N/A * http://www.apache.org/licenses/LICENSE-2.0
0N/A *
0N/A * Unless required by applicable law or agreed to in writing, software
0N/A * distributed under the License is distributed on an "AS IS" BASIS,
0N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0N/A * See the License for the specific language governing permissions and
0N/A * limitations under the License.
0N/A *
0N/A */
0N/A
0N/Apackage com.sun.org.apache.xml.internal.security.utils.resolver.implementations;
0N/A
0N/Aimport java.io.FileInputStream;
0N/Aimport java.io.FileNotFoundException;
0N/Aimport java.io.IOException;
0N/Aimport java.io.InputStream;
0N/A
0N/Aimport com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
0N/Aimport com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverSpi;
0N/Aimport org.w3c.dom.Attr;
0N/A
0N/A/**
0N/A *
661N/A * @author $Author: mullan $
0N/A */
0N/A
0N/Apublic class ResolverAnonymous extends ResourceResolverSpi {
0N/A
0N/A private XMLSignatureInput _input = null;
0N/A
0N/A /**
0N/A * @param filename
0N/A * @throws FileNotFoundException
0N/A * @throws IOException
0N/A */
0N/A public ResolverAnonymous(String filename) throws FileNotFoundException, IOException {
0N/A this._input = new XMLSignatureInput(new FileInputStream(filename));
0N/A }
0N/A
0N/A /**
0N/A * @param is
0N/A */
0N/A public ResolverAnonymous(InputStream is) {
0N/A this._input = new XMLSignatureInput(is);
0N/A }
0N/A
0N/A /** @inheritDoc */
0N/A public XMLSignatureInput engineResolve(Attr uri, String BaseURI) {
0N/A return this._input;
0N/A }
0N/A
0N/A /**
0N/A * @inheritDoc
0N/A */
0N/A public boolean engineCanResolve(Attr uri, String BaseURI) {
0N/A if (uri == null) {
0N/A return true;
0N/A }
0N/A return false;
0N/A }
0N/A
0N/A /** @inheritDoc */
0N/A public String[] engineGetPropertyKeys() {
0N/A return new String[0];
0N/A }
0N/A}