public final class IoUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
close(FileDescriptor fd)
Calls close(2) on 'fd'.
|
static void |
closeQuietly(FileDescriptor fd)
Closes 'fd', ignoring any exceptions.
|
static void |
closeQuietly(java.net.Socket socket)
Closes 'socket', ignoring any exceptions.
|
static void |
deleteContents(java.io.File dir)
Recursively delete everything in
dir . |
static void |
setBlocking(FileDescriptor fd,
boolean blocking)
Sets 'fd' to be blocking or non-blocking, according to the state of 'blocking'.
|
public static void close(FileDescriptor fd) throws java.io.IOException
java.io.IOException
public static void closeQuietly(FileDescriptor fd)
public static void closeQuietly(java.net.Socket socket)
public static void setBlocking(FileDescriptor fd, boolean blocking) throws java.io.IOException
java.io.IOException
public static void deleteContents(java.io.File dir) throws java.io.IOException
dir
.java.io.IOException