| Constructor and Description |
|---|
RunnerFile(File file)
Construtor.
|
RunnerFile(File file,
String fileType)
Construtor.
|
| Modifier and Type | Method and Description |
|---|---|
IFileLock |
acquireExclusiveLock(Window window) |
IFileLock |
acquireSharedLock(Window window) |
boolean |
canExecute() |
boolean |
canRead() |
boolean |
canWrite() |
void |
close()
Fecha o arquivo.
|
void |
close(boolean forceQuit)
Fecha este arquivo.
|
boolean |
exists() |
String |
getAbsolutePath()
Retorna o caminho para o arquivo.
|
IFile[] |
getChildren() |
FileLocationType |
getFileLocationType() |
InputStream |
getInputStream() |
long |
getModificationDate() |
String |
getName() |
OutputStream |
getOutputStream() |
IFile |
getParent() |
String[] |
getPath() |
String |
getStringPath() |
String |
getType()
Informa o tipo do arquivo.
|
boolean |
isDirectory()
Indica se este arquivo é um diretório.
|
void |
open(boolean readOnly) |
long |
position()
Informa a posição corrente deste arquivo.
|
void |
position(long newPosition)
Altera a posição corrente deste arquivo.
|
int |
read(byte[] dst,
int off,
int len,
long position) |
int |
read(byte[] dst,
long position)
Lê uma seqüência de bytes deste arquivo a partir da posição fornecida.
|
void |
setType(String type)
Define o tipo do arquivo.
|
long |
size()
Consulta o tamanho do arquivo.
|
void |
write(byte[] src,
int off,
int len,
long position) |
void |
write(byte[] src,
long position) |
public RunnerFile(File file)
file - o arquivo local associado.public String getAbsolutePath()
public void setType(String type)
type - o tipo.public String getType()
public boolean isDirectory()
isDirectory in interface IFilepublic long position()
throws IOException
position in interface IFileIOException - se houver falha no acesso ao arquivo.public void position(long newPosition)
throws IOException
position in interface IFilenewPosition - Nova posição corrente do arquivo.IOException - se houver falha no acesso ao arquivo.public void close(boolean forceQuit)
throws IOException
close in interface IFileIOException - se houver falha no acesso ao arquivo.Channel.close()public void close()
throws IOException
IOException - em caso de erro de I/O.public long size()
public IFile[] getChildren()
getChildren in interface IFilepublic InputStream getInputStream() throws IOException
getInputStream in interface IFileIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface IFileIOExceptionpublic String getStringPath()
getStringPath in interface IFilepublic void open(boolean readOnly)
throws Exception
public long getModificationDate()
getModificationDate in interface IFilepublic int read(byte[] dst,
int off,
int len,
long position)
throws Exception
public int read(byte[] dst,
long position)
throws Exception
public void write(byte[] src,
int off,
int len,
long position)
throws IOException,
FileLockedException
write in interface IFileIOExceptionFileLockedExceptionpublic void write(byte[] src,
long position)
throws IOException,
FileLockedException
write in interface IFileIOExceptionFileLockedExceptionpublic FileLocationType getFileLocationType()
getFileLocationType in interface IFilepublic boolean exists()
throws IOException
exists in interface IFileIOExceptionpublic boolean canExecute()
canExecute in interface IFilepublic IFileLock acquireExclusiveLock(Window window) throws Exception
acquireExclusiveLock in interface IFileExceptionCopyright © 2013–2015 Tecgraf/PUC-Rio. All rights reserved.