java: public final CharBuffer decode(ByteBuffer buffer) {try {return newDecoder().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE).decode(buffer);} catch (CharacterCodingException ex) {throw new Error(ex.getMessage(), ex);}}
C#: public java.nio.CharBuffer decode(java.nio.ByteBuffer buffer){try{return newDecoder().onMalformedInput(java.nio.charset.CodingErrorAction.REPLACE).onUnmappableCharacter(java.nio.charset.CodingErrorAction.REPLACE).decode(buffer);}catch (java.nio.charset.CharacterCodingException ex){throw new System.Exception(ex.Message, ex);}}