net.sourceforge.atunes.kernel.utils
Class ClosingUtils

java.lang.Object
  extended by net.sourceforge.atunes.kernel.utils.ClosingUtils

public class ClosingUtils
extends java.lang.Object

Utility methods for closing streams, sockets, ...


Constructor Summary
ClosingUtils()
           
 
Method Summary
static void close(java.io.Closeable closable)
           Closes a closable object (e.g.
static void close(java.net.ServerSocket socket)
           Closes a server socket Note: This method does not throw an IOException .
static void close(java.net.Socket socket)
           Closes a socket Note: This method does not throw an IOException .
static void close(java.beans.XMLDecoder decoder)
           Closes a XMLDecoder .
static void close(java.beans.XMLEncoder encoder)
           Closes a XMLEncoder .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClosingUtils

public ClosingUtils()
Method Detail

close

public static void close(java.io.Closeable closable)

Closes a closable object (e.g. InputStreams and OutputStreams)

Note: This method does not throw an IOException

Parameters:
closable - The closable object that should be closed (null is permitted)

close

public static void close(java.net.ServerSocket socket)

Closes a server socket

Note: This method does not throw an IOException

.

Parameters:
socket - The server socket that should be closed (null is permitted)

close

public static void close(java.net.Socket socket)

Closes a socket

Note: This method does not throw an IOException

.

Parameters:
socket - The socket that should be closed (null is permitted)

close

public static void close(java.beans.XMLDecoder decoder)

Closes a XMLDecoder

.

Parameters:
decoder - The XMLDecoder that should be closed (null is permitted)

close

public static void close(java.beans.XMLEncoder encoder)

Closes a XMLEncoder

.

Parameters:
encoder - The XMLEncoder that should be closed (null is permitted)


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.