FileDocCategorySizeDatePackage
Writers.javaAPI DocAndroid 1.5 API1422Wed May 06 22:41:02 BST 2009com.android.dx.util

Writers

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 java.io.PrintWriterprintWriterFor(java.io.Writer writer)
Makes a PrintWriter for the given Writer, returning the given writer if it already happens to be the right class.

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

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

        return new PrintWriter(writer);