public interface LocalFile
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead()
Verifica se é possível ler o arquivo.
|
boolean |
canWrite()
Verifica se é possível escrever no arquivo.
|
boolean |
exists()
Verifica se o arquivo existe no sistema de arquivos.
|
String |
getAbsolutePath()
Obtém o caminho completo para o arquivo, incluindo seu nome.
|
InputStream |
getInputStream()
Obtém um fluxo de entrada para leitura do arquivo.
|
long |
getLength()
Obtém o tamanho do arquivo.
|
String |
getName()
Obtém o nome do arquivo.
|
OutputStream |
getOutputStream(boolean append)
Obtém um fluxo de saída para escrita no arquivo.
|
boolean |
isDirectory()
Indica se é um diretório ou um arquivo regular.
|
boolean isDirectory()
true se for diretório ou false se for arquivo.long getLength()
throws IOException
IOException - Caso ocorra algum erro durante o procedimento.boolean canRead()
throws IOException
IOException - Caso ocorra algum erro durante o procedimento.boolean canWrite()
throws IOException
IOException - Caso ocorra algum erro durante o procedimento.InputStream getInputStream() throws IOException
IOException - Caso ocorra algum erro durante o procedimento.OutputStream getOutputStream(boolean append) throws IOException
append - se true, os bytes serão acrescentados ao fim do
arquivo. se false, serão escritos no início (o arquivo
será sobrescrito).IOException - Caso ocorra algum erro durante o procedimento.String getName() throws IOException
IOException - Caso ocorra algum erro durante o procedimento.String getAbsolutePath() throws IOException
IOException - Caso ocorra algum erro durante o procedimento.boolean exists()
true se o arquivo for encontrado no sistema de
arquivos.Copyright © 2017. All rights reserved.