I am extending a class imported into my library successfully. Everything works perfectly until I try to extend it using a custom class which errors out when requesting the BasicNameValuePair. The file is near a direct copy paste of
public class CustomFilePart extends StreamPart {
File file;
public CustomFilePart(String name, final File file) {
super(name, (int)file.length(), new ArrayList<NameValuePair>() {
{
add(new BasicNameValuePair("filename", file.getName()));
}
});
getRawHeaders().set("Content-Type", "video/*");
this.file = file;
}
@Override
protected InputStream getInputStream() throws IOException {
return new FileInputStream(file);
}
}
Gradle
compile 'com.koushikdutta.ion:ion:2.1.7'
compile 'com.koushikdutta.async:androidasync:2.1.7'