public class VGet extends Object
| Modifier and Type | Field and Description |
|---|---|
protected VideoInfo |
info |
protected File |
targetDir |
protected File |
targetForce |
| Constructor and Description |
|---|
VGet(URL source)
extract video information constructor
|
VGet(URL source,
File targetDir) |
VGet(VideoInfo info)
Set targetFile manually after you call .extract()
|
VGet(VideoInfo info,
File targetDir) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
done(AtomicBoolean stop) |
void |
download() |
void |
download(AtomicBoolean stop,
Runnable notify) |
void |
download(VGetParser user) |
void |
download(VGetParser user,
AtomicBoolean stop,
Runnable notify) |
boolean |
empty() |
boolean |
exists(File f,
AtomicBoolean conflict) |
void |
extract() |
void |
extract(AtomicBoolean stop,
Runnable notify) |
void |
extract(VGetParser user,
AtomicBoolean stop,
Runnable notify)
extract video information, retry until success
|
String |
getContentExt(com.github.axet.wget.info.DownloadInfo dinfo) |
String |
getExt(com.github.axet.wget.info.DownloadInfo dinfo) |
VideoFileInfo |
getNewInfo(List<VideoFileInfo> infoList,
VideoFileInfo infoOld) |
VideoInfo |
getVideo() |
static String |
maxFileNameLength(String str) |
static VGetParser |
parser(URL web) |
static VGetParser |
parser(VGetParser user,
URL web) |
static String |
replaceBadChars(String f)
Drop all forbidden characters from filename
|
boolean |
retry(Throwable e) |
void |
retry(VGetParser user,
AtomicBoolean stop,
Runnable notify,
Throwable e) |
void |
setTarget(File file)
set target file for single download source.
|
void |
setTargetDir(File targetDir) |
void |
targetFile(VideoFileInfo dinfo,
String ext,
AtomicBoolean conflict)
set targetFile for specified VideoFileInfo.
|
void |
targetFileExt(VideoFileInfo dinfo,
String ext,
AtomicBoolean conflict) |
void |
targetFileForce(VideoFileInfo dinfo) |
protected VideoInfo info
protected File targetDir
protected File targetForce
public VGet(URL source)
source - url source to get video frompublic VGet(VideoInfo info)
info - download info.public void setTarget(File file)
file - public void setTargetDir(File targetDir)
public VideoInfo getVideo()
public void download()
public void download(VGetParser user)
public static String replaceBadChars(String f)
f - input file namepublic boolean done(AtomicBoolean stop)
public VideoFileInfo getNewInfo(List<VideoFileInfo> infoList, VideoFileInfo infoOld)
public void retry(VGetParser user, AtomicBoolean stop, Runnable notify, Throwable e)
public String getExt(com.github.axet.wget.info.DownloadInfo dinfo)
public String getContentExt(com.github.axet.wget.info.DownloadInfo dinfo)
public boolean exists(File f, AtomicBoolean conflict)
public void targetFileForce(VideoFileInfo dinfo)
public void targetFileExt(VideoFileInfo dinfo, String ext, AtomicBoolean conflict)
public void targetFile(VideoFileInfo dinfo, String ext, AtomicBoolean conflict)
dinfo - VideoFileInfo to set targetFile forext - File extension. call getExt() or getContentExt()conflict - True if we have same file extension for multiply files. File name will be renamed to " (1).ext"public boolean retry(Throwable e)
public boolean empty()
public void extract()
public void extract(AtomicBoolean stop, Runnable notify)
public void extract(VGetParser user, AtomicBoolean stop, Runnable notify)
user - user info objectstop - stop signal booleannotify - notify executrepublic void download(AtomicBoolean stop, Runnable notify)
public void download(VGetParser user, AtomicBoolean stop, Runnable notify)
public static VGetParser parser(URL web)
public static VGetParser parser(VGetParser user, URL web)
Copyright © 2016. All Rights Reserved.