public class FileDescriptor
extends java.lang.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(java.lang.Object o) |
static FileDescriptor |
from(java.io.File file)
Open a new
FileDescriptor for the given File. |
static FileDescriptor |
from(java.lang.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. |
static FileDescriptor[] |
pipe() |
int |
read(java.nio.ByteBuffer buf,
int pos,
int limit) |
int |
readAddress(long address,
int pos,
int limit) |
java.lang.String |
toString() |
int |
write(java.nio.ByteBuffer buf,
int pos,
int limit) |
int |
writeAddress(long address,
int pos,
int limit) |
long |
writev(java.nio.ByteBuffer[] buffers,
int offset,
int length) |
long |
writevAddresses(long memoryAddress,
int length) |
public int intValue()
public void close()
throws java.io.IOException
java.io.IOExceptionpublic boolean isOpen()
true if the file descriptor is open.public final int write(java.nio.ByteBuffer buf,
int pos,
int limit)
throws java.io.IOException
java.io.IOExceptionpublic final int writeAddress(long address,
int pos,
int limit)
throws java.io.IOException
java.io.IOExceptionpublic final long writev(java.nio.ByteBuffer[] buffers,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic final long writevAddresses(long memoryAddress,
int length)
throws java.io.IOException
java.io.IOExceptionpublic final int read(java.nio.ByteBuffer buf,
int pos,
int limit)
throws java.io.IOException
java.io.IOExceptionpublic final int readAddress(long address,
int pos,
int limit)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static FileDescriptor from(java.lang.String path) throws java.io.IOException
FileDescriptor for the given path.java.io.IOExceptionpublic static FileDescriptor from(java.io.File file) throws java.io.IOException
FileDescriptor for the given File.java.io.IOExceptionpublic static FileDescriptor[] pipe() throws java.io.IOException
java.io.IOExceptionCopyright © 2008–2018 The Netty Project. All rights reserved.