|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.util.IoUtils
LOG-DONE Generic I/O utility methods.
Constructor Summary | |
IoUtils()
|
Method Summary | |
static void |
copy(java.io.File sourceFile,
java.io.File targetFile)
Copies one file to another. |
static void |
copy(java.io.InputStream in,
java.io.File targetFile)
Copies an input stream to a file. |
static void |
copy(java.io.InputStream in,
java.io.OutputStream out)
Copies an input stream to an output stream. |
static boolean |
deleteDir(java.io.File dir)
Deletes all files and subdirectories under dir. |
static java.io.ByteArrayInputStream |
toByteArrayInputStream(java.io.ByteArrayOutputStream out)
Converts a ByteArrayOutputStream into a ByteArrayInputStream. |
static java.io.InputStream |
toInputStream(java.lang.String str)
Convert the specified string to an input stream. |
static java.lang.String |
toString(java.io.InputStream in)
TODO |
static java.lang.String |
toString(java.io.InputStream in,
java.lang.String encoding)
TODO |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IoUtils()
Method Detail |
public static void copy(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- an input stream; must not be nullout
- an output stream; must not be null
java.io.IOException
- if the copy failspublic static void copy(java.io.InputStream in, java.io.File targetFile) throws java.io.IOException
in
- an input stream to copy fromtargetFile
- the file to copy to; if the file already exists, it will be overwritten
java.io.IOException
- if the copy failspublic static void copy(java.io.File sourceFile, java.io.File targetFile) throws java.io.IOException
sourceFile
- an existing file to copy fromtargetFile
- the file to copy to; if the file already exists, it will be overwritten
java.io.IOException
- if the copy failspublic static boolean deleteDir(java.io.File dir)
public static java.io.ByteArrayInputStream toByteArrayInputStream(java.io.ByteArrayOutputStream out)
out
-
public static java.io.InputStream toInputStream(java.lang.String str)
str
- a string
public static java.lang.String toString(java.io.InputStream in) throws java.io.IOException
in
-
java.io.IOException
public static java.lang.String toString(java.io.InputStream in, java.lang.String encoding) throws java.io.IOException
in
- encoding
-
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |