Java File Delete clearFile(String pFileName)

Here you can find the source of clearFile(String pFileName)

Description

clear File

License

Open Source License

Declaration

public static void clearFile(String pFileName) 

Method Source Code

//package com.java2s;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class Main {
    public static void clearFile(String pFileName) {
        try {//from  w  w w.  ja v a  2 s .co  m
            new FileOutputStream(pFileName);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. clearFile(File file)
  2. clearFile(String directory)
  3. clearFileOrDir(File file)
  4. delete(File aFile)
  5. delete(File classDir)
  6. delete(File current)