Example usage for java.io PrintStream println

List of usage examples for java.io PrintStream println

Introduction

In this page you can find the example usage for java.io PrintStream println.

Prototype

public void println(Object x) 

Source Link

Document

Prints an Object and then terminate the line.

Usage

From source file:com.hp.application.automation.tools.run.SvExportBuilder.java

/**
 * Cleans all sub-folders containing *.vproj file.
 *//*from  w  ww.j a  va 2  s .  co m*/
private void cleanTargetDirectory(PrintStream logger, String targetDirectory) throws IOException {
    File target = new File(targetDirectory);
    if (target.exists()) {
        File[] subfolders = target.listFiles((FilenameFilter) DirectoryFileFilter.INSTANCE);
        if (subfolders.length > 0) {
            logger.println("  Cleaning target directory...");
        }
        for (File subfolder : subfolders) {
            if (subfolder.listFiles((FilenameFilter) new SuffixFileFilter(".vproj")).length > 0) {
                logger.println("    Deleting subfolder of target directory: " + subfolder.getAbsolutePath());
                FileUtils.deleteDirectory(subfolder);
            } else {
                logger.println("    Skipping delete of directory '" + subfolder.getAbsolutePath()
                        + "' because it does not contain any *.vproj file.");
            }
        }
    }
}

From source file:com.facebook.stetho.dumpapp.Dumper.java

private void dumpAvailablePlugins(PrintStream output) {
    List<String> pluginNames = new ArrayList<String>();
    for (DumperPlugin pluginToDump : mDumperPlugins.values()) {
        pluginNames.add(pluginToDump.getName());
    }//  ww  w  .ja  v  a  2 s . c om
    Collections.sort(pluginNames);
    for (String pluginName : pluginNames) {
        output.println(pluginName);
    }
}