mmhttp.util
Class FileUtil

java.lang.Object
  extended by mmhttp.util.FileUtil

public class FileUtil
extends java.lang.Object


Field Summary
static java.lang.String ENDL
           
 
Constructor Summary
FileUtil()
           
 
Method Summary
static java.lang.String buildPath(java.lang.String[] parts)
           
static void copyBytes(java.io.InputStream input, java.io.OutputStream output)
           
static java.io.File createDir(java.lang.String path)
           
static java.io.File createFile(java.io.File file, java.lang.String content)
           
static java.io.File createFile(java.lang.String path, java.lang.String content)
           
static void deleteFile(java.io.File file)
           
static void deleteFile(java.lang.String filename)
           
static void deleteFileSystemDirectory(java.io.File current)
           
static void deleteFileSystemDirectory(java.lang.String dirPath)
           
static java.io.File[] getDirectoryListing(java.io.File dir)
           
static byte[] getFileBytes(java.io.File input)
           
static java.lang.String getFileContent(java.io.File input)
           
static java.lang.String getFileContent(java.lang.String path)
           
static java.util.LinkedList getFileLines(java.io.File file)
           
static java.util.LinkedList getFileLines(java.lang.String filename)
           
static boolean makeDir(java.lang.String path)
           
static void writeLinesToFile(java.io.File file, java.util.List lines)
           
static void writeLinesToFile(java.lang.String filename, java.util.List lines)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENDL

public static final java.lang.String ENDL
Constructor Detail

FileUtil

public FileUtil()
Method Detail

createFile

public static java.io.File createFile(java.lang.String path,
                                      java.lang.String content)

createFile

public static java.io.File createFile(java.io.File file,
                                      java.lang.String content)

makeDir

public static boolean makeDir(java.lang.String path)

deleteFileSystemDirectory

public static void deleteFileSystemDirectory(java.lang.String dirPath)

deleteFileSystemDirectory

public static void deleteFileSystemDirectory(java.io.File current)

deleteFile

public static void deleteFile(java.lang.String filename)

deleteFile

public static void deleteFile(java.io.File file)

getFileContent

public static java.lang.String getFileContent(java.lang.String path)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

getFileContent

public static java.lang.String getFileContent(java.io.File input)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

getFileBytes

public static byte[] getFileBytes(java.io.File input)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getFileLines

public static java.util.LinkedList getFileLines(java.lang.String filename)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getFileLines

public static java.util.LinkedList getFileLines(java.io.File file)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

writeLinesToFile

public static void writeLinesToFile(java.lang.String filename,
                                    java.util.List lines)
                             throws java.lang.Exception
Throws:
java.lang.Exception

writeLinesToFile

public static void writeLinesToFile(java.io.File file,
                                    java.util.List lines)
                             throws java.lang.Exception
Throws:
java.lang.Exception

copyBytes

public static void copyBytes(java.io.InputStream input,
                             java.io.OutputStream output)
                      throws java.lang.Exception
Throws:
java.lang.Exception

createDir

public static java.io.File createDir(java.lang.String path)

getDirectoryListing

public static java.io.File[] getDirectoryListing(java.io.File dir)

buildPath

public static java.lang.String buildPath(java.lang.String[] parts)


Copyright © 2009 Micah Martin. All Rights Reserved.