com.jimischopp.jyoutube
Class JYouTube.ProgressReportingFilePart

java.lang.Object
  extended by org.apache.commons.httpclient.methods.multipart.Part
      extended by org.apache.commons.httpclient.methods.multipart.PartBase
          extended by org.apache.commons.httpclient.methods.multipart.FilePart
              extended by com.jimischopp.jyoutube.JYouTube.ProgressReportingFilePart
Enclosing class:
JYouTube

public static class JYouTube.ProgressReportingFilePart
extends org.apache.commons.httpclient.methods.multipart.FilePart

ProgressReportingFilePart issues events to listeners updating them about the progress of a multi-part file upload of an HTTP request. This is useful for monitoring the progress is very large file uploads, such as YouTube videos...


Nested Class Summary
static interface JYouTube.ProgressReportingFilePart.ProgressListener
          Interface to be implemented if you wish to receive updates about HTTP file upload progress
static class JYouTube.ProgressReportingFilePart.ProgressUpdateEvent
          Contains event information about the progress of an HTTP File Upload
 
Field Summary
 
Fields inherited from class org.apache.commons.httpclient.methods.multipart.FilePart
DEFAULT_CHARSET, DEFAULT_CONTENT_TYPE, DEFAULT_TRANSFER_ENCODING
 
Constructor Summary
JYouTube.ProgressReportingFilePart(java.lang.String parameterName, java.io.File file, java.util.Collection<JYouTube.ProgressReportingFilePart.ProgressListener> progressListeners)
           
 
Method Summary
 void addListener(java.util.Collection<JYouTube.ProgressReportingFilePart.ProgressListener> listener)
           
 void addListener(JYouTube.ProgressReportingFilePart.ProgressListener listener)
           
 java.lang.String getFileName()
           
 java.lang.String getParameterName()
           
 boolean removeListener(JYouTube.ProgressReportingFilePart.ProgressListener listener)
           
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.PartBase
getCharSet, getContentType, getName, getTransferEncoding, setCharSet, setContentType, setName, setTransferEncoding
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.Part
getBoundary, getLengthOfParts, getLengthOfParts, isRepeatable, length, send, sendParts, sendParts, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JYouTube.ProgressReportingFilePart

public JYouTube.ProgressReportingFilePart(java.lang.String parameterName,
                                          java.io.File file,
                                          java.util.Collection<JYouTube.ProgressReportingFilePart.ProgressListener> progressListeners)
                                   throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

addListener

public void addListener(JYouTube.ProgressReportingFilePart.ProgressListener listener)

addListener

public void addListener(java.util.Collection<JYouTube.ProgressReportingFilePart.ProgressListener> listener)

removeListener

public boolean removeListener(JYouTube.ProgressReportingFilePart.ProgressListener listener)

getFileName

public java.lang.String getFileName()

getParameterName

public java.lang.String getParameterName()