Writers.javaAPI DocAndroid 1.5 API1422Wed May 06 22:41:02 BST


public final class Writers extends Object
Utilities for dealing with Writers.

Fields Summary
Constructors Summary
private Writers()
This class is uninstantiable.

        // This space intentionally left blank.
Methods Summary
public static writer)
Makes a PrintWriter for the given Writer, returning the given writer if it already happens to be the right class.

writer non-null; writer to (possibly) wrap
non-null; an appropriate instance

        if (writer instanceof PrintWriter) {
            return (PrintWriter) writer;

        return new PrintWriter(writer);