use of com.acgist.snail.net.ftp.FtpClient in project snail by acgist.
the class FtpProtocol method buildSize.
@Override
protected void buildSize() throws DownloadException {
final FtpClient client = FtpClient.newInstance(this.url);
try {
client.connect();
final long size = client.size();
this.taskEntity.setSize(size);
} catch (NetException e) {
throw new DownloadException(e);
} finally {
client.close();
}
}
Aggregations