Source Code Cross Referenced for NoSuchMechanismException.java in  » 6.0-JDK-Core » xml » javax » xml » crypto » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.crypto 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025        /*
026         * $Id: NoSuchMechanismException.java,v 1.4 2005/05/10 15:47:42 mullan Exp $
027         */
028        package javax.xml.crypto;
029
030        import java.io.PrintStream;
031        import java.io.PrintWriter;
032        import javax.xml.crypto.dsig.Manifest;
033        import javax.xml.crypto.dsig.XMLSignature;
034        import javax.xml.crypto.dsig.XMLSignatureFactory;
035        import javax.xml.crypto.dsig.keyinfo.KeyInfo;
036        import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory;
037
038        /**
039         * This exception is thrown when a particular XML mechanism is requested but
040         * is not available in the environment.
041         *
042         * <p>A <code>NoSuchMechanismException</code> can contain a cause: another 
043         * throwable that caused this <code>NoSuchMechanismException</code> to get 
044         * thrown. 
045         *
046         * @author Sean Mullan
047         * @author JSR 105 Expert Group
048         * @since 1.6
049         * @see XMLSignatureFactory#getInstance XMLSignatureFactory.getInstance
050         * @see KeyInfoFactory#getInstance KeyInfoFactory.getInstance
051         */
052        public class NoSuchMechanismException extends RuntimeException {
053
054            private static final long serialVersionUID = 4189669069570660166L;
055
056            /**
057             * The throwable that caused this exception to get thrown, or null if this
058             * exception was not caused by another throwable or if the causative
059             * throwable is unknown. 
060             *
061             * @serial
062             */
063            private Throwable cause;
064
065            /**
066             * Constructs a new <code>NoSuchMechanismException</code> with 
067             * <code>null</code> as its detail message.
068             */
069            public NoSuchMechanismException() {
070                super ();
071            }
072
073            /**
074             * Constructs a new <code>NoSuchMechanismException</code> with the 
075             * specified detail message. 
076             *
077             * @param message the detail message
078             */
079            public NoSuchMechanismException(String message) {
080                super (message);
081            }
082
083            /**
084             * Constructs a new <code>NoSuchMechanismException</code> with the 
085             * specified detail message and cause.  
086             * <p>Note that the detail message associated with
087             * <code>cause</code> is <i>not</i> automatically incorporated in
088             * this exception's detail message.
089             *
090             * @param message the detail message 
091             * @param cause the cause (A <tt>null</tt> value is permitted, and 
092             *	      indicates that the cause is nonexistent or unknown.)
093             */
094            public NoSuchMechanismException(String message, Throwable cause) {
095                super (message);
096                this .cause = cause;
097            }
098
099            /**
100             * Constructs a new <code>NoSuchMechanismException</code> with the 
101             * specified cause and a detail message of 
102             * <code>(cause==null ? null : cause.toString())</code> (which typically 
103             * contains the class and detail message of <code>cause</code>).
104             *
105             * @param cause the cause (A <tt>null</tt> value is permitted, and 
106             *        indicates that the cause is nonexistent or unknown.)
107             */
108            public NoSuchMechanismException(Throwable cause) {
109                super (cause == null ? null : cause.toString());
110                this .cause = cause;
111            }
112
113            /**
114             * Returns the cause of this <code>NoSuchMechanismException</code> or 
115             * <code>null</code> if the cause is nonexistent or unknown.  (The 
116             * cause is the throwable that caused this 
117             * <code>NoSuchMechanismException</code> to get thrown.)
118             *
119             * @return the cause of this <code>NoSuchMechanismException</code> or 
120             *         <code>null</code> if the cause is nonexistent or unknown.
121             */
122            public Throwable getCause() {
123                return cause;
124            }
125
126            /**
127             * Prints this <code>NoSuchMechanismException</code>, its backtrace and
128             * the cause's backtrace to the standard error stream.
129             */
130            public void printStackTrace() {
131                super .printStackTrace();
132                //XXX print backtrace of cause
133            }
134
135            /**
136             * Prints this <code>NoSuchMechanismException</code>, its backtrace and
137             * the cause's backtrace to the specified print stream.
138             *
139             * @param s <code>PrintStream</code> to use for output
140             */
141            public void printStackTrace(PrintStream s) {
142                super .printStackTrace(s);
143                //XXX print backtrace of cause
144            }
145
146            /**
147             * Prints this <code>NoSuchMechanismException</code>, its backtrace and
148             * the cause's backtrace to the specified print writer.
149             *
150             * @param s <code>PrintWriter</code> to use for output
151             */
152            public void printStackTrace(PrintWriter s) {
153                super .printStackTrace(s);
154                //XXX print backtrace of cause
155            }
156        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.