CharacterCodingException vs UnsupportedEncodingException

I'm trying to decode a file using UTF-8 - which I assumed is the "parent" encoding set.
However, I get the CharactercodingException - My assumption was that UnsupportedEncodingException would be thrown!!

Anyone can tell me the difference between the two?CharactercodingException vs UnsupportedEncodingExceptionCharactercodingException vs UnsupportedEncodingException

I'm trying to decode a file using UTF-8 - which I assumed is the "parent" encoding set.
However, I get the CharactercodingException - My assumption was that UnsupportedEncodingException would be thrown!!

Anyone can tell me the difference between the two?CharactercodingException vs UnsupportedEncodingExceptionCharactercodingException vs UnsupportedEncodingException

You get an UEE if you specify a non-existing encoding, say "UTF-42". You get a CCE if an unknown byte value is present in the input stream (not all byte values at every position make sense as a UTF-8 encoded stream).