Class JustTestLahFileEntity

  • All Implemented Interfaces:
    Cloneable, org.apache.http.HttpEntity

    public class JustTestLahFileEntity
    extends org.apache.http.entity.FileEntity
    Extension of FileEntity to enable a progress report for file uploads.

    taken from https://stackoverflow.com/questions/7057342/how-to-get-a-progress-bar-for-a-file-upload-with-apache-httpclient-4#8475006

    • Constructor Detail

      • JustTestLahFileEntity

        public JustTestLahFileEntity​(File file)
    • Method Detail

      • writeTo

        public void writeTo​(OutputStream outstream)
                     throws IOException
        Specified by:
        writeTo in interface org.apache.http.HttpEntity
        Overrides:
        writeTo in class org.apache.http.entity.FileEntity
        Throws:
        IOException
      • getProgress

        public int getProgress()
        Returns:
        the progress of the upload (0-100)