|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jaulp.io.StreamUtils
public class StreamUtils
Utility class for input/output operations.
| Constructor Summary | |
|---|---|
StreamUtils()
|
|
| Method Summary | |
|---|---|
static void |
close(java.io.InputStream in)
Closes the given InputStream. |
static void |
close(java.io.OutputStream out)
Closes the given OutputStream. |
static void |
close(java.io.Reader reader)
Closes the given Reader. |
static void |
close(java.io.Writer writer)
Closes the given Writer. |
static boolean |
closeInputStream(java.io.InputStream in)
Closes the given InputStream. |
static boolean |
closeOutputStream(java.io.OutputStream out)
Closes the given OutputStream. |
static boolean |
closeReader(java.io.Reader reader)
Closes the given Reader. |
static boolean |
closeWriter(java.io.Writer writer)
Closes the given Writer. |
static byte[] |
getByteArray(java.io.InputStream in)
Returns the given InputStream as a byte array. |
static byte[] |
getByteArray(java.io.InputStream in,
java.io.ByteArrayOutputStream os)
Gets the byte array. |
static java.lang.String |
getPackagePath(java.lang.Class clazz)
Deprecated. Use instead ResourceUtils.getPackagePath(Class). |
static long |
getSerialVersionUID(java.lang.Class clazz)
Gets the SerialVersionUID from the given Class. |
static void |
writeInputStreamToOutputStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream,
boolean closeStream)
The Method writeInputStreamToOutputStream(InputStream, OutputStream, boolean) writes to the given OutputStream from an opened InputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamUtils()
| Method Detail |
|---|
public static void close(java.io.InputStream in)
throws java.io.IOException
in - The InputStream to close.
java.io.IOException - Signals that an I/O exception has occurred.
public static void close(java.io.OutputStream out)
throws java.io.IOException
out - The OutputStream to close.
java.io.IOException - Signals that an I/O exception has occurred.
public static void close(java.io.Reader reader)
throws java.io.IOException
reader - The Reader to close.
java.io.IOException - Signals that an I/O exception has occurred.
public static void close(java.io.Writer writer)
throws java.io.IOException
writer - The Writer to close.
java.io.IOException - Signals that an I/O exception has occurred.public static boolean closeInputStream(java.io.InputStream in)
in - The InputStream to close.
public static boolean closeOutputStream(java.io.OutputStream out)
out - The OutputStream to close.
public static boolean closeReader(java.io.Reader reader)
reader - The Reader to close.
public static boolean closeWriter(java.io.Writer writer)
writer - The Writer to close.
public static byte[] getByteArray(java.io.InputStream in)
throws java.io.IOException
in - The InputStream.
java.io.IOException - Signals that an I/O exception has occurred.
public static byte[] getByteArray(java.io.InputStream in,
java.io.ByteArrayOutputStream os)
throws java.io.IOException
in - The InputStream.os - The ByteArrayOutputStream.
java.io.IOException - Signals that an I/O exception has occurred.@Deprecated public static java.lang.String getPackagePath(java.lang.Class clazz)
clazz - The Class.
public static long getSerialVersionUID(java.lang.Class clazz)
clazz - The class
public static void writeInputStreamToOutputStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream,
boolean closeStream)
throws java.io.IOException
inputStream - The opened InputStream.outputStream - The opened OutputStream.closeStream - If true then close the outputStream otherwise keep open.
java.io.IOException - Signals that an I/O exception has occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||