package com.android.http.multipart;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
private File file = null;
private String fileName = null;
this.file = file;
if (file != null) {
if (!file.isFile()) {
throw new FileNotFoundException("File is not a normal file.");
}
if (!file.canRead()) {
throw new FileNotFoundException("File is not readable.");
}
this.fileName = file.getName();
}
}
throws FileNotFoundException {
this(file);
if (fileName != null) {
this.fileName = fileName;
}
}
if (this.file != null) {
return this.file.length();
} else {
return 0;
}
}
return (fileName == null) ? "noname" : fileName;
}
if (this.file != null) {
return new FileInputStream(this.file);
} else {
return new ByteArrayInputStream(new byte[] {});
}
}
}