java.io.UnsupportedEncodingException

hi,

I encountered “java.io.UnsupportedEncodingException” error in a java agent when i tried to execute

rd = new BufferedReader(new InputStreamReader(conn.getInputStream(),“”));

Any idea how to rectify it?. Following is the error details from the log file.

"30/03/2006 01:01:58 PM HTTP JVM: java.io.UnsupportedEncodingException: "

“30/03/2006 01:01:58 PM HTTP JVM: at sun.io.Converters.getConverterClass(Converters.java:121)”

“30/03/2006 01:01:58 PM HTTP JVM: at sun.io.Converters.newConverter(Converters.java:152)”

“30/03/2006 01:01:58 PM HTTP JVM: at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:81)”

“30/03/2006 01:01:58 PM HTTP JVM: at java.io.InputStreamReader.(InputStreamReader.java:93)”

“30/03/2006 01:01:58 PM HTTP JVM: at JavaAgent.NotesMain(JavaAgent.java:39)”

“30/03/2006 01:01:58 PM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)”

“30/03/2006 01:01:58 PM HTTP JVM: at lotus.domino.NotesThread.run(NotesThread.java:215)”

Thanks

Anil.

Subject: java.io.UnsupportedEncodingException

Well the java.io.InputStreamReader class is used to convert from a byte stream (conn.getInputStream()) to a character stream (BufferedReader) so you need to supply the character encoding the conversion should occur under (ASCII, UTF-8, UTF-16 etc.). The exception is probably thrown because you didn’t supply an encoding (the “” argument to the InputStreamReader) or because the underlying byte stream doesn’t match the default encoding on the platform.

/lekkim