public class FileDescriptor
extends java.lang.Object
FileDescriptor implementation which allows to wrap an int and provide a
FileDescriptor for it.| 构造器和说明 |
|---|
FileDescriptor(int fd) |
| 限定符和类型 | 方法和说明 |
|---|---|
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. |
protected boolean |
markClosed() |
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 maxBytesToWrite) |
long |
writevAddresses(long memoryAddress,
int length) |
public final int intValue()
protected boolean markClosed()
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,
long maxBytesToWrite)
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 在类中 java.lang.Objectpublic boolean equals(java.lang.Object o)
equals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在类中 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.IOException