java.io

Class CharConversionException

Implemented Interfaces:
Serializable
Known Direct Subclasses:
MalformedByteSequenceException

public class CharConversionException
extends IOException

Base class for character conversion exceptions.
Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary

CharConversionException()
This provides no detailed message.
CharConversionException(String s)
This provides a detailed message.

Method Summary

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

CharConversionException

public CharConversionException()
This provides no detailed message.
Usages and Demos :

View More Examples of CharConversionException()
   1:                     if(c > 127)
   2:                         throw new UndeclaredThrowableException(new CharConversionException());
   3:                     out = out.evaluateByte((byte)c);
   4:                     return this;
   5:                 }

View Full Code Here
   1:                     if(c > 127)
   2:                         throw new UndeclaredThrowableException(new CharConversionException());
   3:                     out = out.evaluateChar(c);
   4:         ...
   5:                     if(i != 0)
   6:                         throw new UndeclaredThrowableException(new CharConversionException());
   7:                     return AsChars.unwrap(out);
   8:                 }
   9:             }

View Full Code Here
   1:     case 0xD800:
   2:       throw new CharConversionException();
   3:     }
   4:         ...
   5:     if ((c1 & 0xFC00) != 0xD800 || (c2 & 0xFC00) != 0xDC00)
   6:       throw new CharConversionException();
   7:     int c = ((c1 & 0x3FF) << 10) | (c2 & 0x3FF);
   8:     c += 0x10000;
   9:     put((byte)(((c >> 18) & 0x7) | 0xF0));

View Full Code Here
   1:                     if(j != 0)
   2:                         throw new UndeclaredThrowableException(new CharConversionException());
   3:                     if(null == dst)
   4:                         dst = new byte[i];
   5:                     s = new ByteArrayInputStream(dst, 0, i);

View Full Code Here

CharConversionException

public CharConversionException(String s)
This provides a detailed message.
Parameters:
s - the detailed message associated with the exception.
Usages and Demos :

View More Examples of CharConversionException(String s)
   1:    public void write(int c) throws IOException {
   2:       if ((c & ~mask) != 0) throw new CharConversionException(localStrings.getString("unallowed_char") + " " + c);
   3:       out.write(c);
   4:         ...
   5:             if ((c & ~mask) != 0)
   6:                throw new CharConversionException(localStrings.getString("unallowed_char") + " " + c);
   7:             else
   8:                buf[i - offset] = (byte) c;
   9:          }

View Full Code Here
   1:     if (filename != null)
   2:       return new CharConversionException(filename + ":" + line + ": " + msg);
   3:     else
   4:         ...
   5:       return new CharConversionException(msg);
   6:   }
   7: }

View Full Code Here
   1:     if (filename != null)
   2:       return new CharConversionException(filename + ":" + line + ": " + msg);
   3:     else
   4:         ...
   5:       return new CharConversionException(msg);
   6:   }
   7: }

View Full Code Here
   1:         if( j+2 >= end ) {
   2:             throw new CharConversionException("EOF");
   3:         }
   4:         ...
   5:         if( !isHexDigit( b1 ) || ! isHexDigit(b2 ))
   6:             throw new CharConversionException( "isHexDigit");
   7:         
   8:         ...
   9:         if( j+2 >= cend ) {
  10:             throw new CharConversionException("EOF");
  11:         }

View Full Code Here
   1:                     String message = "Failed to encode the line " + (i + 1);
   2:                     IOException wrapping = new CharConversionException(message);
   3:                     wrapping.initCause(e);
   4:                     throw wrapping;
   5:                 }

View Full Code Here