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
IOException
public boolean isOpen()
true
if the file descriptor is open.public static FileDescriptor from(String path) throws IOException
FileDescriptor
for the given path.IOException
public static FileDescriptor from(File file) throws IOException
FileDescriptor
for the given File
.IOException
Copyright © 2008–2015 The Netty Project. All rights reserved.