Android Open Source - AndroidUploader File Http Uploader






From Project

Back to project page AndroidUploader.

License

The source code is released under:

Apache License

If you think the Android project AndroidUploader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package z.hol.uploader;
// w w w . j  ava  2 s.  c  o  m
import z.hol.uploader.bridge.HttpBridge;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * ?????
 * Created by holmes on 10/19/14.
 */
public class FileHttpUploader extends HttpUploader{

    private File mFile;

    public FileHttpUploader(File file, HttpBridge bridge) throws FileNotFoundException {
        super(new FileInputStream(file), file.length(), bridge);
        mFile = file;
    }

    /**
     * ??????
     * @return
     */
    public File getFile(){
        return mFile;
    }

    /**
     * ????????
     * @return
     */
    public String getFilepath(){
        return mFile.getAbsolutePath();
    }

    /**
     * ????????
     * @return
     */
    public long getFileLength(){
        return mFile.length();
    }
}




Java Source Code List

z.hol.uploader.FileHttpUploader.java
z.hol.uploader.HttpUploader.java
z.hol.uploader.StreamUploader.java
z.hol.uploader.UploadStateCallback.java
z.hol.uploader.UploadUiHandler.java
z.hol.uploader.Uploader.java
z.hol.uploader.bridge.Bridge.java
z.hol.uploader.bridge.HttpBridge.java
z.hol.uploader.bridge.StreamBridge.java