Java PrintStream Create getPrintStream(String string)

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

Description

get Print Stream

License

Open Source License

Declaration

public static PrintStream getPrintStream(String string) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static PrintStream getPrintStream(String string) {
        try {/*from w w  w.  j a v  a 2 s .c o m*/
            return new PrintStream(new FileOutputStream(string));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

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