public class FileDescriptorImpl extends Object implements FileDescriptor
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isPipe |
protected boolean |
isSocket |
protected String |
path |
protected long |
pipeInode |
protected static Pattern |
pipePattern |
protected long |
socketInode |
protected static Pattern |
socketPattern |
protected String |
target |
| Constructor and Description |
|---|
FileDescriptorImpl(File path)
Конструктор
|
FileDescriptorImpl(FileDescriptor sample) |
FileDescriptorImpl(String path)
Конструктор
|
| Modifier and Type | Method and Description |
|---|---|
void |
assign(FileDescriptor fd) |
FileDescriptor |
clone() |
String |
getDesc()
Возваращет имя, обычно это число
|
long |
getPipeInode()
i-node pipe
|
long |
getSocketInode()
i-node сокета
|
String |
getTarget()
Возвращает адрес куда ссылается дискриптор, например /dev/pts/6
|
boolean |
isPipe()
Ссылается на pipe
|
boolean |
isSocket()
Ссылается на сокет
|
protected String target
protected String path
protected boolean isSocket
protected boolean isPipe
protected long socketInode
protected long pipeInode
protected static final Pattern socketPattern
protected static final Pattern pipePattern
public FileDescriptorImpl(FileDescriptor sample)
public FileDescriptorImpl(String path)
path - путь к файл-дискриптору, например /proc/self/fd/1public FileDescriptorImpl(File path)
path - путь к файл-дискриптору, например /proc/self/fd/1public void assign(FileDescriptor fd)
public FileDescriptor clone()
public String getDesc()
getDesc in interface FileDescriptorpublic String getTarget()
getTarget in interface FileDescriptorpublic boolean isSocket()
isSocket in interface FileDescriptorpublic boolean isPipe()
isPipe in interface FileDescriptorpublic long getSocketInode()
getSocketInode in interface FileDescriptorpublic long getPipeInode()
getPipeInode in interface FileDescriptorCopyright © 2018. All rights reserved.