Minor changes to java.io in the Java 2 Platform v1.2
Java2 SDK Contents The following changes to package java.io were introduced in version 1.2 of the Java2 Platform. Minor changes to this package were:
- The out field of the PrintWriter class is now protected rather than private, so that subclasses may access it
- The RandomAccessFile class supports a new setLength method; and
- The StringWriter(int) constructor is now public.
In the Java 2 Platform, the following constructors check for null input parameters:
- The constructors java.io.OutputStream)">PrintStream(OutputStream out) and PrintStream(OutputStream out, boolean autoFlush) will throw a NullPointerException if the parameter out is null.
- The constructors java.io.InputStream)">InputStreamReader(InputStream in) and InputStreamReader(InputStream in, String enc) will throw a NullPointerException if the in parameter is null.
- The constructors java.io.OutputStream)">OutputStreamWriter(OutputStream out) and OutputStreamWriter(OutputStream out, String enc) will throw a NullPointerException if the out parameter is null.
- The protected constructors java.lang.Object)">Reader(Object lock) and java.lang.Object)">Writer(Object lock) now throw NullPointerException if the lock parameter is null.