|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsdk.v1_0.runner.filesystem.RunnerFile
public class RunnerFile
Simula um arquivo na sandbox do CSDK.
Essa classe *não* deve ser usada por desenvolvedores CSDK em suas aplicações.
Ela é de uso exclusivo do ambiente simulado do Runner.
| Constructor Summary | |
|---|---|
RunnerFile(File file)
Construtor. |
|
RunnerFile(File file,
String fileType)
Construtor. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RunnerFile(File file)
file - o arquivo local associado.
public RunnerFile(File file,
String fileType)
file - o arquivo local associado.fileType - o tipo do arquivo.| Method Detail |
|---|
public String getAbsolutePath()
public void setType(String type)
type - o tipo.public String getType()
getType in interface IFilepublic boolean isDirectory()
isDirectory in interface IFile
public 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()
size in interface IFilepublic IFile[] getChildren()
getChildren in interface IFile
public InputStream getInputStream()
throws IOException
getInputStream in interface IFileIOExceptionpublic String getName()
getName in interface IFile
public OutputStream getOutputStream()
throws IOException
getOutputStream in interface IFileIOExceptionpublic String[] getPath()
getPath in interface IFilepublic String getStringPath()
getStringPath in interface IFile
public void open(boolean readOnly)
throws Exception
open in interface IFileExceptionpublic long getModificationDate()
getModificationDate in interface IFile
public int read(byte[] dst,
int off,
int len,
long position)
throws Exception
read in interface IFileException
public int read(byte[] dst,
long position)
throws Exception
read in interface 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,
FileLockedException
write in interface IFileIOException
FileLockedException
public void write(byte[] src,
long position)
throws IOException,
FileLockedException
write in interface IFileIOException
FileLockedExceptionpublic FileLocationType getFileLocationType()
getFileLocationType in interface IFilepublic IFile getParent()
getParent in interface IFile
public boolean exists()
throws IOException
exists in interface IFileIOExceptionpublic boolean canRead()
canRead in interface IFilepublic boolean canWrite()
canWrite in interface IFilepublic boolean canExecute()
canExecute in interface IFile
public IFileLock acquireExclusiveLock(Window window)
throws Exception
acquireExclusiveLock in interface IFileException
public IFileLock acquireSharedLock(Window window)
throws Exception
acquireSharedLock in interface IFileException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||