public class CoderResult extends Object
Modifier and Type | Field and Description |
---|---|
static CoderResult |
OVERFLOW |
static CoderResult |
UNDERFLOW |
Modifier and Type | Method and Description |
---|---|
boolean |
isError() |
boolean |
isMalformed() |
boolean |
isOverflow() |
boolean |
isUnderflow() |
boolean |
isUnmappable() |
int |
length() |
static CoderResult |
malformedForLength(int length) |
void |
throwException() |
String |
toString()
Convert this Object to a human-readable String.
|
static CoderResult |
unmappableForLength(int length) |
public static final CoderResult OVERFLOW
public static final CoderResult UNDERFLOW
public boolean isError()
public boolean isMalformed()
public boolean isOverflow()
public boolean isUnderflow()
public boolean isUnmappable()
public int length()
public static CoderResult malformedForLength(int length)
public void throwException() throws CharacterCodingException
CharacterCodingException
public String toString()
Object
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())
.
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
public static CoderResult unmappableForLength(int length)