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.IOException
public 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.IOException
public final int writeAddress(long address, int pos, int limit) throws java.io.IOException
java.io.IOException
public final long writev(java.nio.ByteBuffer[] buffers, int offset, int length) throws java.io.IOException
java.io.IOException
public final long writevAddresses(long memoryAddress, int length) throws java.io.IOException
java.io.IOException
public final int read(java.nio.ByteBuffer buf, int pos, int limit) throws java.io.IOException
java.io.IOException
public final int readAddress(long address, int pos, int limit) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static FileDescriptor from(java.lang.String path) throws java.io.IOException
FileDescriptor
for the given path.java.io.IOException
public static FileDescriptor from(java.io.File file) throws java.io.IOException
FileDescriptor
for the given File
.java.io.IOException
public static FileDescriptor[] pipe() throws java.io.IOException
java.io.IOException
Copyright © 2008–2018 The Netty Project. All rights reserved.