|
XDC - v. 0.6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.xdc.util.IOUtils
This utility class contains a number of useful static methods related to Stream manipulation.
| Method Summary | |
static void |
copy(java.io.InputStream input,
java.io.OutputStream output)
Reads byte data in chunks of a specified size from one stream and writes it into another stream. |
static void |
copy(java.io.Reader input,
java.io.Writer output)
Reads character data in chunks of a specified size from a Reader and writes it into a Writer. |
static void |
copyTree(java.io.File srcDir,
java.io.File targetDir)
This method is used to recursively copy the contents of one complete directory tree from one location in the file system to another. |
static java.io.Reader |
getReader(java.io.File file,
java.nio.charset.Charset charset)
This method constructs a Reader object of a File
for a given Charset. |
static java.io.Reader |
getReader(java.lang.String filename,
java.nio.charset.Charset charset)
This method constructs a Reader object of a File
for a given Charset. |
static java.io.Writer |
getWriter(java.io.File file,
java.nio.charset.Charset charset)
This method constructs a Writer object of a File
for a given Charset. |
static java.io.Writer |
getWriter(java.lang.String filename,
java.nio.charset.Charset charset)
This method constructs a Writer object of a File
for a given Charset. |
static boolean |
isDefaultExclude(java.lang.String filename)
This method is used to determine whether a path constituent should be excluded from processing because it is most likely a directory or file containing version control information. |
static boolean |
makeEmpty(java.io.File directory)
This method is used to completely delete all contents of a directory including all files and (recursively) subdirectories, but not the (specified) directory itself. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void copy(java.io.InputStream input,
java.io.OutputStream output)
throws java.io.IOException
input - The InputStream from which to read the dataoutput - The OutputStream to which to write the data
java.io.IOException
public static void copy(java.io.Reader input,
java.io.Writer output)
throws java.io.IOException
input - The Reader from which to read the dataoutput - The Writer to which to write the data
java.io.IOExceptionpublic static boolean makeEmpty(java.io.File directory)
directory - The directory whose contents are to be deleted
public static boolean isDefaultExclude(java.lang.String filename)
filename - The name of the path constituent (directory or file) for
which a check is performed
public static void copyTree(java.io.File srcDir,
java.io.File targetDir)
throws java.io.IOException
srcDir - The source directory whose contents are to be
copiedtargetDir - The target directory (to which the contents
of the source directory are copied)
java.io.IOException
public static java.io.Reader getReader(java.io.File file,
java.nio.charset.Charset charset)
throws java.io.FileNotFoundException
Reader object of a File
for a given Charset.
file - The file for which the Reader is to be
constructedcharset - The Charset of the Reader
to be constructed
Reader object for the specified File
with the specified Charset
java.io.FileNotFoundException
public static java.io.Reader getReader(java.lang.String filename,
java.nio.charset.Charset charset)
throws java.io.FileNotFoundException
Reader object of a File
for a given Charset.
filename - The name of the file for which the Reader
is to be constructedcharset - The Charset of the Reader
to be constructed
Reader object for the specified File
with the specified Charset
java.io.FileNotFoundException
public static java.io.Writer getWriter(java.io.File file,
java.nio.charset.Charset charset)
throws java.io.IOException
Writer object of a File
for a given Charset.
file - The file for which the Writer is to be
constructedcharset - The Charset of the Writer
to be constructed
Writer object for the specified File
with the specified Charset
java.io.FileNotFoundException
java.io.IOException
public static java.io.Writer getWriter(java.lang.String filename,
java.nio.charset.Charset charset)
throws java.io.IOException
Writer object of a File
for a given Charset.
filename - The name of the file for which the Writer
is to be constructedcharset - The Charset of the Writer
to be constructed
Writer object for the specified File
with the specified Charset
java.io.FileNotFoundException
java.io.IOException
|
XDC - v. 0.6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||