wt.clients.util
Class FileUpload

java.lang.Object
  extended bywt.clients.util.FileUpload

public class FileUpload
extends Object


Nested Class Summary
static class FileUpload.Server
           
 
Field Summary
private  boolean cancel
           
private  int chunkSize
           
private static boolean DEBUG
           
private  File file
           
private  FileAccess fileAccess
           
private static int MAXRETRY
           
private  int numChunks
           
private static WTProperties properties
           
private  String remoteFilename
           
private static String SERVER_CLASS
           
private  boolean trxStarted
           
private  MultiPartPostListener uploadListener
           
 
Constructor Summary
(package private) FileUpload(File file)
           
(package private) FileUpload(String filename)
           
 
Method Summary
(package private)  int getChunkSize()
           
(package private)  int getNumChunks()
           
(package private)  String getRemoteFilename()
           
static void main(String[] argv)
           
(package private)  void removeFile()
          Remove file from server.
 void setCancel(boolean cancel)
          Set cancel flag checked during upload of file.
(package private)  void setChunkSize(int chunkSize)
           
 void setListener(MultiPartPostListener listener)
           
(package private)  void setRemoteFilename(String remoteFilename)
           
(package private)  void startUpload()
          Start upload of file to server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_CLASS

private static final String SERVER_CLASS

properties

private static WTProperties properties

DEBUG

private static boolean DEBUG

MAXRETRY

private static int MAXRETRY

fileAccess

private FileAccess fileAccess

chunkSize

private int chunkSize

numChunks

private int numChunks

file

private File file

remoteFilename

private String remoteFilename

trxStarted

private boolean trxStarted

cancel

private boolean cancel

uploadListener

private MultiPartPostListener uploadListener
Constructor Detail

FileUpload

FileUpload(String filename)

FileUpload

FileUpload(File file)
Method Detail

setListener

public void setListener(MultiPartPostListener listener)

setRemoteFilename

void setRemoteFilename(String remoteFilename)

getRemoteFilename

String getRemoteFilename()

setChunkSize

void setChunkSize(int chunkSize)

getChunkSize

int getChunkSize()

getNumChunks

int getNumChunks()

startUpload

void startUpload()
           throws WTSecurityException,
                  IOException
Start upload of file to server

Throws:
WTSecurityException
IOException

setCancel

public void setCancel(boolean cancel)
Set cancel flag checked during upload of file.


removeFile

void removeFile()
          throws Exception
Remove file from server.

Throws:
Exception

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception