1. /*
  2. * @(#)UnmappableCharacterException.java 1.4 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.nio.charset;
  8. /**
  9. * Checked exception thrown when an input character (or byte) sequence
  10. * is valid but cannot be mapped to an output byte (or character)
  11. * sequence. </p>
  12. *
  13. * @since 1.4
  14. */
  15. public class UnmappableCharacterException
  16. extends CharacterCodingException
  17. {
  18. private int inputLength;
  19. public UnmappableCharacterException(int inputLength) {
  20. this.inputLength = inputLength;
  21. }
  22. public int getInputLength() {
  23. return inputLength;
  24. }
  25. public String getMessage() {
  26. return "Input length = " + inputLength;
  27. }
  28. }