forked from chromiumembedded/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCefDownloadItem.java
More file actions
94 lines (76 loc) · 1.85 KB
/
CefDownloadItem.java
File metadata and controls
94 lines (76 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
package org.cef.callback;
import java.util.Date;
/**
* Class used to represent a download item.
*/
public interface CefDownloadItem {
/**
* Returns true if this object is valid. Do not call any other methods if this
* function returns false.
*/
boolean isValid();
/**
* Returns true if the download is in progress.
*/
boolean isInProgress();
/**
* Returns true if the download is complete.
*/
boolean isComplete();
/**
* Returns true if the download has been canceled or interrupted.
*/
boolean isCanceled();
/**
* Returns a simple speed estimate in bytes/s.
*/
long getCurrentSpeed();
/**
* Returns the rough percent complete or -1 if the receive total size is
* unknown.
*/
int getPercentComplete();
/**
* Returns the total number of bytes.
*/
long getTotalBytes();
/**
* Returns the number of received bytes.
*/
long getReceivedBytes();
/**
* Returns the time that the download started.
*/
Date getStartTime();
/**
* Returns the time that the download ended.
*/
Date getEndTime();
/**
* Returns the full path to the downloaded or downloading file.
*/
String getFullPath();
/**
* Returns the unique identifier for this download.
*/
int getId();
/**
* Returns the URL.
*/
String getURL();
/**
* Returns the suggested file name.
*/
String getSuggestedFileName();
/**
* Returns the content disposition.
*/
String getContentDisposition();
/**
* Returns the mime type.
*/
String getMimeType();
}