com.guiseframework.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
 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 com.guiseframework.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 is null.
java.lang.IllegalStateException - the platform file can no longer be uploaded because, for example, other platform files have since been selected.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.