FileDocCategorySizeDatePackage
Writers.javaAPI DocAndroid 5.1 API1426Thu Mar 12 22:18:30 GMT 2015com.android.dexgen.util

Writers

public final class Writers extends Object
Utilities for dealing with {@code Writer}s.

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 {@code PrintWriter} for the given {@code Writer}, returning the given writer if it already happens to be the right class.

param
writer {@code non-null;} writer to (possibly) wrap
return
{@code non-null;} an appropriate instance

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

        return new PrintWriter(writer);