public class FileDescriptor extends Object
FileDescriptor implementation which allows to wrap an int and provide a
FileDescriptor for it.| Constructor and Description |
|---|
FileDescriptor(int fd) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the file descriptor.
|
boolean |
equals(Object o) |
static FileDescriptor |
from(File file)
Open a new
FileDescriptor for the given File. |
static FileDescriptor |
from(String path)
Open a new
FileDescriptor for the given path. |
int |
hashCode() |
int |
intValue()
Return the int value of the filedescriptor.
|
boolean |
isOpen()
Returns
true if the file descriptor is open. |
String |
toString() |
public int intValue()
public void close()
throws IOException
IOExceptionpublic boolean isOpen()
true if the file descriptor is open.public static FileDescriptor from(String path) throws IOException
FileDescriptor for the given path.IOExceptionpublic static FileDescriptor from(File file) throws IOException
FileDescriptor for the given File.IOExceptionCopyright © 2008–2015 The Netty Project. All rights reserved.