public class Files
extends java.lang.Object
| Constructor and Description |
|---|
Files() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(java.io.File source,
java.io.File target)
Copy the source
File to the target File. |
static void |
copy(java.io.InputStream is,
java.io.OutputStream os)
Copy the
InputStream to the OutputStream. |
static java.io.File |
createTempFile()
Creates a temporary file.
|
static java.lang.String |
toString(java.io.File file)
Reads a
File and returns a . |
static java.lang.String |
toString(java.io.File file,
java.nio.charset.Charset charset)
Reads a
File and returns a . |
static void |
writeToFile(java.io.File file,
java.lang.String content,
java.nio.charset.Charset charset)
Writes
String content to File. |
public static java.io.File createTempFile()
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String toString(java.io.File file,
java.nio.charset.Charset charset)
throws java.io.IOException
File and returns a .file - charset - java.io.IOExceptionpublic static java.lang.String toString(java.io.File file)
throws java.io.IOException
File and returns a .file - java.io.IOExceptionpublic static void writeToFile(java.io.File file,
java.lang.String content,
java.nio.charset.Charset charset)
throws java.io.IOException
String content to File.file - content - charset - java.io.IOExceptionpublic static void copy(java.io.File source,
java.io.File target)
throws java.io.IOException
File to the target File.source - target - java.io.IOExceptionpublic static void copy(java.io.InputStream is,
java.io.OutputStream os)
throws java.io.IOException
InputStream to the OutputStream.is - os - java.io.IOExceptionCopyright © 2014 Red Hat. All Rights Reserved.