java.nio.charset
Class CoderResult
java.lang.Object
java.nio.charset.CoderResult
public class CoderResult
- extends Object
- Since:
- 1.4
OVERFLOW
public static final CoderResult OVERFLOW
UNDERFLOW
public static final CoderResult UNDERFLOW
isError
public boolean isError()
isMalformed
public boolean isMalformed()
isOverflow
public boolean isOverflow()
isUnderflow
public boolean isUnderflow()
isUnmappable
public boolean isUnmappable()
length
public int length()
malformedForLength
public static CoderResult malformedForLength(int length)
throwException
public void throwException()
throws CharacterCodingException
- Throws:
CharacterCodingException
toString
public String toString()
- Description copied from class:
Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into
System.out.println()
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a RuntimeException
.
This method will be called when performing string
concatenation with this object. If the result is
null
, string concatenation will instead
use "null"
.
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode())
.
- Overrides:
toString
in class Object
- Returns:
- the String representing this Object, which may be null
- See Also:
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
unmappableForLength
public static CoderResult unmappableForLength(int length)