public interface FileConnection extends StreamConnection
Modifier and Type | Method and Description |
---|---|
long |
availableSize() |
boolean |
canRead() |
boolean |
canWrite() |
void |
create() |
void |
delete() |
long |
directorySize(boolean includeSubDirs) |
boolean |
exists() |
long |
fileSize() |
String |
getName() |
String |
getPath() |
String |
getURL() |
boolean |
isDirectory() |
boolean |
isHidden() |
boolean |
isOpen() |
long |
lastModified() |
Enumeration |
list() |
Enumeration |
list(String filter,
boolean includeHidden) |
void |
mkdir() |
DataInputStream |
openDataInputStream()
Open and return a data input stream for a connection.
|
DataOutputStream |
openDataOutputStream()
Open and return a data output stream for a connection.
|
InputStream |
openInputStream()
Open and return an input stream for a connection.
|
OutputStream |
openOutputStream()
Open and return an output stream for a connection.
|
OutputStream |
openOutputStream(long byteOffset) |
void |
rename(String newName) |
void |
setFileConnection(String fileName) |
void |
setHidden(boolean hidden) |
void |
setReadable(boolean readable) |
void |
setWritable(boolean writable) |
long |
totalSize() |
void |
truncate(long byteOffset) |
long |
usedSize() |
close
boolean isOpen()
InputStream openInputStream() throws IOException
InputConnection
openInputStream
in interface InputConnection
IOException
- If an I/O error occursDataInputStream openDataInputStream() throws IOException
InputConnection
openDataInputStream
in interface InputConnection
IOException
- If an I/O error occursOutputStream openOutputStream() throws IOException
OutputConnection
openOutputStream
in interface OutputConnection
IOException
- If an I/O error occursDataOutputStream openDataOutputStream() throws IOException
OutputConnection
openDataOutputStream
in interface OutputConnection
IOException
- If an I/O error occursOutputStream openOutputStream(long byteOffset) throws IOException
IOException
long totalSize()
long availableSize()
long usedSize()
long directorySize(boolean includeSubDirs) throws IOException
IOException
long fileSize() throws IOException
IOException
boolean canRead()
boolean canWrite()
boolean isHidden()
void setReadable(boolean readable) throws IOException
IOException
void setWritable(boolean writable) throws IOException
IOException
void setHidden(boolean hidden) throws IOException
IOException
Enumeration list() throws IOException
IOException
Enumeration list(String filter, boolean includeHidden) throws IOException
IOException
void mkdir() throws IOException
IOException
void create() throws IOException
IOException
boolean exists()
boolean isDirectory()
void delete() throws IOException
IOException
void rename(String newName) throws IOException
IOException
void truncate(long byteOffset) throws IOException
IOException
void setFileConnection(String fileName) throws IOException
IOException
String getName()
String getPath()
String getURL()
long lastModified()