/** $Id$ */
+package nicobrowser;
-package nicobrowser
+import java.io.File;
+import nicobrowser.entity.NicoContent.Status;
-import nicobrowser.entity.NicoContent.Status
+public class GetFlvResult {
-class GetFlvResult{
- final Status status
- final String author
+ private final File file;
+ private final Status status;
+ private final String author;
- GetFlvResult(status, author){
- this.status = status
- this.author = author
+ GetFlvResult(File file, Status status, String author) {
+ this.file = file;
+ this.status = status;
+ this.author = author;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public File getFile() {
+ return file;
+ }
+
+ public Status getStatus() {
+ return status;
}
}
if (nowStatus == Status.GET_LOW || !needLowFile) {
if (url.toString().contains("low")) {
log.info("エコノミー動画のためスキップ: " + vi.getRealVideoId());
- return new GetFlvResult(nowStatus, userName);
+ return new GetFlvResult(null, nowStatus, userName);
}
}
if ("text/plain".equals(contentType) || "text/html".equals(contentType)) {
log.error("取得できませんでした. サーバが混みあっている可能性があります: " + vi.getRealVideoId());
response.getEntity().consumeContent();
- return new GetFlvResult(Status.GET_INFO, userName);
+ return new GetFlvResult(null, Status.GET_INFO, userName);
}
String ext = Util.getExtention(contentType);
final long fileSize = response.getEntity().getContentLength();
out.close();
in.close();
if (url.toString().contains("low")) {
- return new GetFlvResult(Status.GET_LOW, userName);
+ return new GetFlvResult(file, Status.GET_LOW, userName);
}
- return new GetFlvResult(Status.GET_FILE, userName);
+ return new GetFlvResult(file, Status.GET_FILE, userName);
}
/**