public class RunnerFile extends Object implements csdk.v2.api.filesystem.IFile
Runner.| Constructor and Description |
|---|
RunnerFile(File file)
Construtor.
|
RunnerFile(File file,
String fileType)
Construtor.
|
| Modifier and Type | Method and Description |
|---|---|
csdk.v2.api.filesystem.IFileLock |
acquireExclusiveLock(Window window) |
csdk.v2.api.filesystem.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.
|
csdk.v2.api.filesystem.IFile[] |
getChildren() |
csdk.v2.api.filesystem.FileLocationType |
getFileLocationType() |
InputStream |
getInputStream() |
long |
getModificationDate() |
String |
getName() |
OutputStream |
getOutputStream() |
csdk.v2.api.filesystem.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()
getType in interface csdk.v2.api.filesystem.IFilepublic boolean isDirectory()
isDirectory in interface csdk.v2.api.filesystem.IFilepublic long position()
throws IOException
position in interface csdk.v2.api.filesystem.IFileIOException - se houver falha no acesso ao arquivo.public void position(long newPosition)
throws IOException
position in interface csdk.v2.api.filesystem.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 csdk.v2.api.filesystem.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()
size in interface csdk.v2.api.filesystem.IFilepublic csdk.v2.api.filesystem.IFile[] getChildren()
getChildren in interface csdk.v2.api.filesystem.IFilepublic InputStream getInputStream() throws IOException
getInputStream in interface csdk.v2.api.filesystem.IFileIOExceptionpublic String getName()
getName in interface csdk.v2.api.filesystem.IFilepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface csdk.v2.api.filesystem.IFileIOExceptionpublic String[] getPath()
getPath in interface csdk.v2.api.filesystem.IFilepublic String getStringPath()
getStringPath in interface csdk.v2.api.filesystem.IFilepublic void open(boolean readOnly)
throws Exception
open in interface csdk.v2.api.filesystem.IFileExceptionpublic long getModificationDate()
getModificationDate in interface csdk.v2.api.filesystem.IFilepublic int read(byte[] dst,
int off,
int len,
long position)
throws Exception
read in interface csdk.v2.api.filesystem.IFileExceptionpublic int read(byte[] dst,
long position)
throws Exception
read in interface csdk.v2.api.filesystem.IFiledst - O buffer no qual os bytes serão escritos.position - A posição do arquivo a partir da qual os bytes serão lidos.Exception - se houver falha no acesso ao arquivo.public void write(byte[] src,
int off,
int len,
long position)
throws IOException,
csdk.v2.api.filesystem.FileLockedException
write in interface csdk.v2.api.filesystem.IFileIOExceptioncsdk.v2.api.filesystem.FileLockedExceptionpublic void write(byte[] src,
long position)
throws IOException,
csdk.v2.api.filesystem.FileLockedException
write in interface csdk.v2.api.filesystem.IFileIOExceptioncsdk.v2.api.filesystem.FileLockedExceptionpublic csdk.v2.api.filesystem.FileLocationType getFileLocationType()
getFileLocationType in interface csdk.v2.api.filesystem.IFilepublic csdk.v2.api.filesystem.IFile getParent()
getParent in interface csdk.v2.api.filesystem.IFilepublic boolean exists()
throws IOException
exists in interface csdk.v2.api.filesystem.IFileIOExceptionpublic boolean canRead()
canRead in interface csdk.v2.api.filesystem.IFilepublic boolean canWrite()
canWrite in interface csdk.v2.api.filesystem.IFilepublic boolean canExecute()
canExecute in interface csdk.v2.api.filesystem.IFilepublic csdk.v2.api.filesystem.IFileLock acquireExclusiveLock(Window window) throws Exception
acquireExclusiveLock in interface csdk.v2.api.filesystem.IFileExceptionCopyright © 2016 Tecgraf/PUC-Rio. All rights reserved.