SUGGESTED FIX
The followings are sent by the licensee.
Please evaluate.
*** org/OutputStreamWriter.java 2 27 16:38:56 2004
--- OutputStreamWriter.java 3 1 10:08:58 2004
***************
*** 9,14 ****
--- 9,18 ----
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
+ import java.nio.charset.CoderMalfunctionError;
+ import java.nio.charset.CharacterCodingException;
+ import java.nio.charset.MalformedInputException;
+ import java.nio.charset.UnmappableCharacterException;
import sun.nio.cs.StreamEncoder;
***************
*** 166,174 ****
--- 170,193 ----
* be invoked by PrintStream.
*/
void flushBuffer() throws IOException {
+ try {
se.flushBuffer();
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
+
/**
* Write a single character.
*
***************
*** 175,182 ****
--- 194,215 ----
* @exception IOException If an I/O error occurs
*/
public void write(int c) throws IOException {
+ try {
se.write(c);
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
/**
* Write a portion of an array of characters.
***************
*** 188,195 ****
--- 221,242 ----
* @exception IOException If an I/O error occurs
*/
public void write(char cbuf[], int off, int len) throws IOException {
+ try {
se.write(cbuf, off, len);
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
/**
* Write a portion of a string.
***************
*** 201,208 ****
--- 248,269 ----
* @exception IOException If an I/O error occurs
*/
public void write(String str, int off, int len) throws IOException {
+ try {
se.write(str, off, len);
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
/**
* Flush the stream.
***************
*** 210,217 ****
--- 271,292 ----
* @exception IOException If an I/O error occurs
*/
public void flush() throws IOException {
+ try {
se.flush();
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
/**
* Close the stream.
***************
*** 219,225 ****
--- 294,314 ----
* @exception IOException If an I/O error occurs
*/
public void close() throws IOException {
+ try {
se.close();
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
+ }
}
}
*** org/InputStreamReader.java 2 27 16:39:20 2004
--- InputStreamReader.java 3 1 10:12:08 2004
***************
*** 9,14 ****
--- 9,18 ----
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
+ import java.nio.charset.CoderMalfunctionError;
+ import java.nio.charset.CharacterCodingException;
+ import java.nio.charset.MalformedInputException;
+ import java.nio.charset.UnmappableCharacterException;
import sun.nio.cs.StreamDecoder;
***************
*** 148,155 ****
--- 152,175 ----
* @exception IOException If an I/O error occurs
*/
public int read() throws IOException {
+ try {
return sd.read();
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (UnsupportedOperationException e) {
+ throw new IOException("UnsupportedOperationException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
/**
* Read characters into a portion of an array.
***************
*** 164,171 ****
--- 184,207 ----
* @exception IOException If an I/O error occurs
*/
public int read(char cbuf[], int offset, int length) throws IOException {
+ try {
return sd.read(cbuf, offset, length);
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (UnsupportedOperationException e) {
+ throw new IOException("UnsupportedOperationException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
/**
* Tell whether this stream is ready to be read. An InputStreamReader is
***************
*** 175,182 ****
--- 211,234 ----
* @exception IOException If an I/O error occurs
*/
public boolean ready() throws IOException {
+ try {
return sd.ready();
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (UnsupportedOperationException e) {
+ throw new IOException("UnsupportedOperationException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
}
+ }
/**
* Close the stream.
***************
*** 184,190 ****
--- 236,258 ----
* @exception IOException If an I/O error occurs
*/
public void close() throws IOException {
+ try {
sd.close();
+ } catch (IllegalStateException e) {
+ throw new IOException("IllegalStateException occurred. in java.nio");
+ } catch (IllegalArgumentException e) {
+ throw new IOException("IllegalArgumentException occurred. in java.nio");
+ } catch (MalformedInputException e) {
+ throw new IOException("MalformedInputException occurred. in java.nio");
+ } catch (UnmappableCharacterException e) {
+ throw new IOException("UnmappableCharacterException occurred. in java.nio");
+ } catch (CharacterCodingException e) {
+ throw new IOException("CharacterCodingException occurred. in java.nio");
+ } catch (UnsupportedOperationException e) {
+ throw new IOException("UnsupportedOperationException occurred. in java.nio");
+ } catch (CoderMalfunctionError e) {
+ throw new IOException("CoderMalfunctionError occurred. in java.nio");
+ }
}
}
###@###.### 2004-03-01
===========================================================================
|