You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
p62xrbca7/java/nio/charset/MalformedInputException.java

71 lines
1.2 KiB

/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.nio.charset;
/**
* Checked exception thrown when an input byte sequence is not legal for given
* charset, or an input character sequence is not a legal sixteen-bit Unicode
* sequence.
*
* @since 1.4
*/
public class MalformedInputException
extends CharacterCodingException
{
private static final long serialVersionUID = -3438823399834806194L;
private int inputLength;
/**
* Constructs an {@code MalformedInputException} with the given
* length.
* @param inputLength the length of the input
*/
public MalformedInputException(int inputLength) {
this.inputLength = inputLength;
}
/**
* Returns the length of the input.
* @return the length of the input
*/
public int getInputLength() {
return inputLength;
}
/**
* Returns the message.
* @return the message
*/
public String getMessage() {
return "Input length = " + inputLength;
}
}