1. /*
  2. * @(#)UnsupportedCharsetException.java 1.2 01/09/17
  3. *
  4. * Copyright 2000 by 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. // -- This file was mechanically generated: Do not edit! -- //
  10. package java.nio.charset;
  11. /**
  12. * Unchecked exception thrown when no support is available
  13. * for a requested charset.
  14. *
  15. * @version 1.2, 01/09/17
  16. * @since 1.4
  17. */
  18. public class UnsupportedCharsetException
  19. extends IllegalArgumentException
  20. {
  21. private String charsetName;
  22. /**
  23. * Constructs an instance of this class. </p>
  24. *
  25. * @param charsetName
  26. * The name of the unsupported charset
  27. */
  28. public UnsupportedCharsetException(String charsetName) {
  29. super(String.valueOf(charsetName));
  30. this.charsetName = charsetName;
  31. }
  32. /**
  33. * Retrieves the name of the unsupported charset. </p>
  34. *
  35. * @return The name of the unsupported charset
  36. */
  37. public String getCharsetName() {
  38. return charsetName;
  39. }
  40. }