MCPcopy Create free account
hub / github.com/davidgiven/luje / throwException

Method throwException

lib/java/nio/charset/CoderResult.java:241–256  ·  view source on GitHub ↗

Throws an exception corresponding to this coder result. @throws BufferUnderflowException in case this is an underflow. @throws BufferOverflowException in case this is an overflow. @throws UnmappableCharacterException in case this is an unmappable-character error.

()

Source from the content-addressed store, hash-verified

239 * the default exception.
240 */
241 public void throwException() throws BufferUnderflowException,
242 BufferOverflowException, UnmappableCharacterException,
243 MalformedInputException, CharacterCodingException {
244 switch (this.type) {
245 case TYPE_UNDERFLOW:
246 throw new BufferUnderflowException();
247 case TYPE_OVERFLOW:
248 throw new BufferOverflowException();
249 case TYPE_UNMAPPABLE_CHAR:
250 throw new UnmappableCharacterException(this.length);
251 case TYPE_MALFORMED_INPUT:
252 throw new MalformedInputException(this.length);
253 default:
254 throw new CharacterCodingException();
255 }
256 }
257
258 /**
259 * Returns a text description of this result.

Callers 1

closeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected