1. /*
  2. * @(#)ApplicationException.java 1.10 00/02/02
  3. *
  4. * Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package org.omg.CORBA.portable;
  11. /**
  12. This class is used for reporting application level exceptions between ORBs and stubs.
  13. */
  14. public class ApplicationException extends Exception {
  15. /**
  16. * Constructs an ApplicationException from the CORBA repository ID of the exception
  17. * and an input stream from which the exception data can be read as its parameters.
  18. * @param id the repository id of the user exception
  19. * @param ins the stream which contains the user exception data
  20. */
  21. public ApplicationException(String id,
  22. InputStream ins) {
  23. this.id = id;
  24. this.ins = ins;
  25. }
  26. /**
  27. * Returns the CORBA repository ID of the exception
  28. * without removing it from the exceptions input stream.
  29. * @return The CORBA repository ID of this exception
  30. */
  31. public String getId() {
  32. return id;
  33. }
  34. /**
  35. * Returns the input stream from which the exception data can be read as its parameters.
  36. * @return The stream which contains the user exception data
  37. */
  38. public InputStream getInputStream() {
  39. return ins;
  40. }
  41. private String id;
  42. private InputStream ins;
  43. }