| # Minor changes to `java.io` in the JavaTM 2 Platform v1.2 | JDKTM Contents

> The following changes to package `java.io` were introduced in version 1.2 of the JavaTM 2 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 `PrintStream(OutputStream out)` and `PrintStream(OutputStream out, boolean autoFlush)` will throw a `NullPointerException` if the parameter `out` is `null`.

> - The constructors `InputStreamReader(InputStream in)` and `InputStreamReader(InputStream in, String enc)` will throw a `NullPointerException` if the `in` parameter is `null`.

> - The constructors `OutputStreamWriter(OutputStream out)` and `OutputStreamWriter(OutputStream out, String enc)` will throw a `NullPointerException` if the `out` parameter is `null`.

> - The protected constructors `Reader(Object lock)` and `Writer(Object lock)` now throw `NullPointerException` if the `lock` parameter is `null`.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved. | Java Software