public String(byte[] data, String encoding);

This method converts a byte array into a sequences of characters,
which is then returned as a new instance of String.  There's a problem
though.  If the byte array cannot be converted (wrong number of
bytes/many other reasons) to chars, then the converter will throw a
CharConversionException.  This is the right thing to do.  However,
String(byte[], encoding) is not allowed to throw a
CharConversionExecption.

So... should I:

a) throw a CharConversionException and go against the Java 1.1 API?
b) throw an UnsupportedEncodingException?
c) throw a RuntimeException?

On a side note, I'm getting very tired of all these "bugs" in the Java
API.  Almost every single method of Sun's java.lang.Character has some
type of bug, and I really don't feel like submitting 20+ bug reports.

-- 
(*sigh*)
Paul Fisher * [EMAIL PROTECTED]

Reply via email to