Package io.guise.framework.platform
Interface PlatformFile
-
- All Superinterfaces:
ProgressListenable<java.lang.Long>
- All Known Implementing Classes:
AbstractPlatformFile
,WebPlatformFile
public interface PlatformFile extends ProgressListenable<java.lang.Long>
A local file on a platform.- Author:
- Garret Wilson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel()
Cancels the current upload or download.java.lang.String
getName()
long
getSize()
void
upload(java.net.URI destinationURI)
Uploads the file from the platform.-
Methods inherited from interface io.guise.framework.event.ProgressListenable
addProgressListener, removeProgressListener
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- The name of the file.
-
getSize
long getSize()
- Returns:
- The size of the file, or -1 if the size is unknown.
-
cancel
void cancel()
Cancels the current upload or download.
-
upload
void upload(java.net.URI destinationURI)
Uploads the file from the platform.- Parameters:
destinationURI
- The URI representing the destination of the platform file, either absolute or relative to the application.- Throws:
java.lang.NullPointerException
- if the given destination URI isnull
.java.lang.IllegalStateException
- the platform file can no longer be uploaded because, for example, other platform files have since been selected.
-
-