]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - eclipse/rap/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/upload/servlet/FileUploadListener.java
Move upload widgets to commons
[lgpl/argeo-commons.git] / eclipse / rap / org.eclipse.rwt.widgets.upload / src / org / eclipse / rwt / widgets / upload / servlet / FileUploadListener.java
diff --git a/eclipse/rap/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/upload/servlet/FileUploadListener.java b/eclipse/rap/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/upload/servlet/FileUploadListener.java
deleted file mode 100644 (file)
index 310a5b3..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002-2007 Critical Software S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Tiago Rodrigues (Critical Software S.A.) - initial implementation
- *     Joel Oliveira (Critical Software S.A.) - initial commit
- ******************************************************************************/
-package org.eclipse.rwt.widgets.upload.servlet;
-
-import org.apache.commons.fileupload.ProgressListener;
-
-/**
- * This is a File Upload Listener that is used by Apache Commons File Upload to
- * monitor the progress of the uploaded file.
- */
-public class FileUploadListener implements ProgressListener {
-
-  private volatile long bytesRead = 0L, contentLength = 0L, item = 0L;
-
-  /**
-   * Creates a new File Upload Listener.
-   */
-  public FileUploadListener() {
-    super();
-  }
-
-  /**
-   * Updates the File properties.
-   * 
-   * @param aBytesRead Number of bytes read.
-   * @param aContentLength The file length.
-   * @param anItem The monitored item.
-   */
-  public final void update( final long aBytesRead,
-                            final long aContentLength,
-                            final int anItem )
-  {
-    bytesRead = aBytesRead;
-    contentLength = aContentLength;
-    item = anItem;
-  }
-
-  /**
-   * Gets the number of bytes read.
-   * 
-   * @return Number of bytes read.
-   */
-  public final long getBytesRead() {
-    return bytesRead;
-  }
-
-  /**
-   * Gets the File length.
-   * 
-   * @return File length.
-   */
-  public final long getContentLength() {
-    return contentLength;
-  }
-
-  /**
-   * Gets the monitored item.
-   * 
-   * @return Monitored item.
-   */
-  public final long getItem() {
-    return item;
-  }
-}