au.com.prunge.jgenfile
Interface GetFileSizeOperation

All Superinterfaces:
FileOperation, ItemOperation, Operation
All Known Implementing Classes:
LocalGetFileSizeOperation

public interface GetFileSizeOperation
extends FileOperation

An operation that retrieves the size of a file.

Version:
1.0
Author:
Peter Runge

Method Summary
 long getSizeInBytes()
          Returns the size of the file in bytes, or -1 if the file size cannot be determined.
 
Methods inherited from interface au.com.prunge.jgenfile.FileOperation
getFile
 
Methods inherited from interface au.com.prunge.jgenfile.ItemOperation
getItem
 
Methods inherited from interface au.com.prunge.jgenfile.Operation
abort, addOperationHints, getLastRunException, getOperationHint, getOperationHints, hasRun, run, setOperationHint, setOperationHints
 

Method Detail

getSizeInBytes

public long getSizeInBytes()
                    throws OperationNotFinishedException,
                           JGenFileException
Returns the size of the file in bytes, or -1 if the file size cannot be determined.

Returns:
the size of the file in bytes, or -1.
Throws:
OperationNotFinishedException - if this method was called and the run() method has not finished or has not been called.
JGenFileException - if another error occurs.