Java PrintStream Create getPrintStream(String file)

Here you can find the source of getPrintStream(String file)

Description

Return a buffered print stream stream for file.

License

Open Source License

Declaration

public static PrintStream getPrintStream(String file) throws IOException 

Method Source Code


//package com.java2s;
import java.io.*;

public class Main {
    /**//from w w  w.  j  a  va  2 s .  c o  m
     * Return a buffered print stream stream for file.
     */
    public static PrintStream getPrintStream(String file) throws IOException {
        return getPrintStream(new File(file));
    }

    /**
      * Return a buffered print stream stream for f.
      */
    public static PrintStream getPrintStream(File f) throws IOException {
        return new PrintStream(new BufferedOutputStream(new FileOutputStream(f), 32676), true);
    }
}

Related

  1. getPrintStream(final OutputStream out)
  2. getPrintStream(String file)
  3. getPrintStream(String fileName)
  4. getPrintStream(String filename, boolean append)
  5. getPrintStream(String string)
  6. getPrintStreamForFile(final File f)