org.x4juli.global.helper
Class IOUtil

java.lang.Object
  extended byorg.x4juli.global.helper.IOUtil

public final class IOUtil
extends java.lang.Object

Utility class for IO Operations. Currently for null safe close without exceptions.

Since:
0.5
Author:
Boris Unckel

Constructor Summary
private IOUtil()
          No instantiation wanted.
 
Method Summary
static void closeInputStream(java.io.InputStream stream)
          Null safe close, does not throw any exception.
static void closeOutputStream(java.io.OutputStream stream)
          Null safe close, does not throw any exception.
static void closeReader(java.io.Reader reader)
          Null safe close, does not throw any exception.
static void closeSocket(java.net.Socket socket)
          Null safe close, does not throw any exception.
static void closeWriter(java.io.Writer writer)
          Null safe close, does not throw any exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtil

private IOUtil()
No instantiation wanted.

Method Detail

closeInputStream

public static void closeInputStream(java.io.InputStream stream)
Null safe close, does not throw any exception.

Parameters:
stream - to close.
Since:
0.5

closeOutputStream

public static void closeOutputStream(java.io.OutputStream stream)
Null safe close, does not throw any exception.

Parameters:
stream - to close.
Since:
0.5

closeWriter

public static void closeWriter(java.io.Writer writer)
Null safe close, does not throw any exception.

Parameters:
writer - to close.
Since:
0.5

closeReader

public static void closeReader(java.io.Reader reader)
Null safe close, does not throw any exception.

Parameters:
reader - to close.
Since:
0.5

closeSocket

public static void closeSocket(java.net.Socket socket)
Null safe close, does not throw any exception.

Parameters:
socket - to close.
Since:
0.5


${license_html}