|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vinculumtech.platform.util.StreamHelper
Utility class which provides methods to close streams, and traps any exceptions which may occur. Nothing will happen if the specified stream is null.
These methods are useful for finally
blocks.
Constructor Summary | |
StreamHelper()
|
Method Summary | |
static void |
close(java.io.InputStream in)
Call InputStream.close() . |
static void |
close(java.io.OutputStream out)
Call OutputStream.close() . |
static void |
close(java.io.Reader in)
Call Reader.close() . |
static void |
close(java.io.Writer out)
Call Writer.close() . |
static void |
copy(java.io.File fromFile,
java.io.File toFile)
|
static void |
copy(java.io.File fromFile,
java.io.File toFile,
int bufferSize)
|
static void |
copy(java.net.URL fromUrl,
java.io.File toFile)
|
static void |
copy(java.net.URL fromUrl,
java.io.File toFile,
int bufferSize)
Copy content from an URL to a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StreamHelper()
Method Detail |
public static void close(java.io.InputStream in)
InputStream.close()
.
public static void close(java.io.OutputStream out)
OutputStream.close()
.
public static void close(java.io.Reader in)
Reader.close()
.
public static void close(java.io.Writer out)
Writer.close()
.
public static void copy(java.net.URL fromUrl, java.io.File toFile, int bufferSize)
public static void copy(java.net.URL fromUrl, java.io.File toFile)
public static void copy(java.io.File fromFile, java.io.File toFile, int bufferSize)
public static void copy(java.io.File fromFile, java.io.File toFile)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |