本文整理匯總了Java中org.cef.network.CefURLRequest類的典型用法代碼示例。如果您正苦於以下問題:Java CefURLRequest類的具體用法?Java CefURLRequest怎麽用?Java CefURLRequest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CefURLRequest類屬於org.cef.network包,在下文中一共展示了CefURLRequest類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: send
import org.cef.network.CefURLRequest; //導入依賴的package包/類
public void send(CefRequest request) {
if (request == null) {
statusLabel_.setText("HTTP-Request status: FAILED");
sentRequest_.append("Can't send CefRequest because it is NULL");
cancelButton_.setEnabled(false);
return;
}
urlRequest_ = CefURLRequest.create(request, this);
if (urlRequest_ == null) {
statusLabel_.setText("HTTP-Request status: FAILED");
sentRequest_.append("Can't send CefRequest because creation of CefURLRequest failed.");
repliedResult_.append("The native code (CEF) returned a NULL-Pointer for CefURLRequest.");
cancelButton_.setEnabled(false);
} else {
sentRequest_.append(request.toString());
cancelButton_.setEnabled(true);
updateStatus("", false);
}
}
示例2: onRequestComplete
import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onRequestComplete(CefURLRequest request) {
String updateStr = "onRequestCompleted\n\n";
CefResponse response = request.getResponse();
boolean isText = response.getHeader("Content-Type").startsWith("text");
updateStr+= response.toString();
updateStatus(updateStr, isText);
}
示例3: onUploadProgress
import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onUploadProgress(CefURLRequest request, int current, int total) {
updateStatus("onUploadProgress: " + current + "/" + total + " bytes\n", false);
}
示例4: onDownloadProgress
import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onDownloadProgress(CefURLRequest request, int current, int total) {
updateStatus("onDownloadProgress: " + current + "/" + total + " bytes\n", false);
}
示例5: onDownloadData
import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onDownloadData(CefURLRequest request, byte[] data, int data_length) {
byteStream_.write(data, 0, data_length);
updateStatus("onDownloadData: " + data_length + " bytes\n", false);
}
示例6: onRequestComplete
import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
* Notifies the client that the request has completed. Use the
* CefURLRequest::GetRequestStatus method to determine if the request was
* successful or not.
*/
void onRequestComplete(CefURLRequest request);
示例7: onUploadProgress
import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
* Notifies the client of upload progress. |current| denotes the number of
* bytes sent so far and |total| is the total size of uploading data (or -1 if
* chunked upload is enabled). This method will only be called if the
* UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
*/
void onUploadProgress(CefURLRequest request, int current, int total);
示例8: onDownloadProgress
import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
* Notifies the client of download progress. |current| denotes the number of
* bytes received up to the call and |total| is the expected total size of the
* response (or -1 if not determined).
*/
void onDownloadProgress(CefURLRequest request, int current, int total);
示例9: onDownloadData
import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
* Called when some part of the response is read. |data| contains the current
* bytes received since the last call. This method will not be called if the
* UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
*/
void onDownloadData(CefURLRequest request, byte[] data, int data_length);
示例10: onUploadProgress
import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
* Notifies the client of upload progress. |current| denotes the number of
* bytes sent so far and |total| is the total size of uploading data (or -1 if
* chunked upload is enabled). This method will only be called if the
* UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
*/
void onUploadProgress(CefURLRequest request,
int current,
int total);
示例11: onDownloadProgress
import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
* Notifies the client of download progress. |current| denotes the number of
* bytes received up to the call and |total| is the expected total size of the
* response (or -1 if not determined).
*/
void onDownloadProgress(CefURLRequest request,
int current,
int total);
示例12: onDownloadData
import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
* Called when some part of the response is read. |data| contains the current
* bytes received since the last call. This method will not be called if the
* UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
*/
void onDownloadData(CefURLRequest request,
byte[] data,
int data_length);