about:blank西欧春官图k

英语: blank 
大词典A大词典B大词典C
[blæŋk]adj.空白的, 茫然的 n.空白, 空白处 vi.消失, 走神 vt.使模糊不清, 删除, 封锁,(比赛时)阻止...得分
例句与用法:
The architect was given/presented with a blank cheque to design a new city centre.
设计师被授予全权设计一个新的城市中心区。
Her explanations were met with blank incomprehension.
大家对她的解释茫然不解。
I can't think where I' my mind's a complete blank!
我想不起来把伞丢在哪儿了,一点印象都没有!
Write your name in the blank.
在空白栏中写上你的名字。
Many blank spaces are still left in the suburbs.
郊区仍留有许多空地。
His memory was completely blank on the subject.
关于这个题目,他已完全丧失记忆。
词形变化:
英英解释:名词 blank:
a blank character used to separate successive words in writing or printing
a substitute for a taboo word
a blank gap or missing part
a piece of material ready to be made into something
a cartridge containing an explosive charge but no bullet
动词 blank:
keep the opposing (baseball) team from winning
形容词 blank:
(of a surface) not written or printed on
void of expression
not charged with a bullet热门点击文章
英雄级,致力于打造最专业的平台,助CFer玩转穿越火线!
蓝蝌蚪旗下网站,Lankdo Network&Technology Co.,Ltd.
闽ICP备号-2&&2014维多利亚的秘密时尚秀
Blank Space(维密秀现场)
韩国毁三观19禁MV合辑
超劲爆无下限无节操MV合辑
爱莉安娜·格兰德
妮琪·米娜* Copyright (C) 2006 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
package android.
import android.net.http.EventH
import android.net.http.RequestH
import android.util.L
import android.webkit.CacheManager.CacheR
import java.util.HashM
import java.util.M
class FrameLoader {
private final LoadListener mL
private final String mM
private final WebSettings mS
private Map mH
private byte[] mPostD
private Network mN
private int mCacheM
private String mR
private String mContentT
private static final int URI_PROTOCOL = 0x100;
private static final String CONTENT_TYPE = "content-type";
// Contents of an about:blank page
private static final String mAboutBlank =
"about:blank";
static final String HEADER_STR = "text/xml, text/html, " +
"application/xhtml+xml, image/png, text/plain, */*;q=0.8";
private static final String LOGTAG = "webkit";
FrameLoader(LoadListener listener, WebSettings settings,
String method) {
mListener =
mHeaders =
mCacheMode = WebSettings.LOAD_NORMAL;
mSettings =
public void setReferrer(String ref) {
// only set referrer for http or https
if (URLUtil.isNetworkUrl(ref)) mReferrer =
public void setPostData(byte[] postData) {
mPostData = postD
public void setContentTypeForPost(String postContentType) {
mContentType = postContentT
public void setCacheMode(int cacheMode) {
mCacheMode = cacheM
public void setHeaders(HashMap headers) {
mHeaders =
public LoadListener getLoadListener() {
* Issues the load request.
* Return value does not indicate if the load was successful or not. It
* simply indicates that the load request is reasonable.
* @return true if the load is reasonable.
public boolean executeLoad() {
String url = mListener.url();
if (URLUtil.isNetworkUrl(url)){
if (mSettings.getBlockNetworkLoads()) {
mListener.error(EventHandler.ERROR_BAD_URL,
mListener.getContext().getString(
com.android.internal.R.string.httpErrorBadUrl));
// Make sure the host part of the url is correctly
// encoded before sending the request
if (!URLUtil.verifyURLEncoding(mListener.host())) {
mListener.error(EventHandler.ERROR_BAD_URL,
mListener.getContext().getString(
com.android.internal.R.string.httpErrorBadUrl));
mNetwork = Network.getInstance(mListener.getContext());
if (mListener.isSynchronous()) {
return handleHTTPLoad();
WebViewWorker.getHandler().obtainMessage(
WebViewWorker.MSG_ADD_HTTPLOADER, this).sendToTarget();
} else if (handleLocalFile(url, mListener, mSettings)) {
if (DebugFlags.FRAME_LOADER) {
Log.v(LOGTAG, "FrameLoader.executeLoad: url protocol not supported:"
+ mListener.url());
mListener.error(EventHandler.ERROR_UNSUPPORTED_SCHEME,
mListener.getContext().getText(
com.android.internal.R.string.httpErrorUnsupportedScheme).toString());
/* package */
static boolean handleLocalFile(String url, LoadListener loadListener,
WebSettings settings) {
// Attempt to decode the percent-encoded url before passing to the
// local loaders.
url = new String(URLUtil.decode(url.getBytes()));
} catch (IllegalArgumentException e) {
loadListener.error(EventHandler.ERROR_BAD_URL,
loadListener.getContext().getString(
com.android.internal.R.string.httpErrorBadUrl));
// Return true here so we do not trigger an unsupported scheme
if (URLUtil.isAssetUrl(url)) {
if (loadListener.isSynchronous()) {
new FileLoader(url, loadListener, FileLoader.TYPE_ASSET,
true).load();
// load asset in a separate thread as it involves IO
WebViewWorker.getHandler().obtainMessage(
WebViewWorker.MSG_ADD_STREAMLOADER,
new FileLoader(url, loadListener, FileLoader.TYPE_ASSET,
true)).sendToTarget();
} else if (URLUtil.isResourceUrl(url)) {
if (loadListener.isSynchronous()) {
new FileLoader(url, loadListener, FileLoader.TYPE_RES,
true).load();
// load resource in a separate thread as it involves IO
WebViewWorker.getHandler().obtainMessage(
WebViewWorker.MSG_ADD_STREAMLOADER,
new FileLoader(url, loadListener, FileLoader.TYPE_RES,
true)).sendToTarget();
} else if (URLUtil.isFileUrl(url)) {
if (loadListener.isSynchronous()) {
new FileLoader(url, loadListener, FileLoader.TYPE_FILE,
settings.getAllowFileAccess()).load();
// load file in a separate thread as it involves IO
WebViewWorker.getHandler().obtainMessage(
WebViewWorker.MSG_ADD_STREAMLOADER,
new FileLoader(url, loadListener, FileLoader.TYPE_FILE,
settings.getAllowFileAccess())).sendToTarget();
} else if (URLUtil.isContentUrl(url)) {
// Send the raw url to the ContentLoader because it will do a
// permission check and the url has to match.
if (loadListener.isSynchronous()) {
new ContentLoader(loadListener.url(), loadListener).load();
// load content in a separate thread as it involves IO
WebViewWorker.getHandler().obtainMessage(
WebViewWorker.MSG_ADD_STREAMLOADER,
new ContentLoader(loadListener.url(), loadListener))
.sendToTarget();
} else if (URLUtil.isDataUrl(url)) {
// load data in the current thread to reduce the latency
new DataLoader(url, loadListener).load();
} else if (URLUtil.isAboutUrl(url)) {
loadListener.data(mAboutBlank.getBytes(), mAboutBlank.length());
loadListener.endData();
boolean handleHTTPLoad() {
if (mHeaders == null) {
mHeaders = new HashMap();
populateStaticHeaders();
populateHeaders();
// response was handled by Cache, don't issue HTTP request
if (handleCache()) {
// push the request data down to the LoadListener
// as response from the cache could be a redirect
// and we may need to initiate a network request if the cache
// can't satisfy redirect URL
mListener.setRequestData(mMethod, mHeaders, mPostData);
if (DebugFlags.FRAME_LOADER) {
Log.v(LOGTAG, "FrameLoader: http " + mMethod + " load for: "
+ mListener.url());
boolean ret =
int error = EventHandler.ERROR_UNSUPPORTED_SCHEME;
ret = mNetwork.requestURL(mMethod, mHeaders,
mPostData, mListener);
} catch (android.net.ParseException ex) {
error = EventHandler.ERROR_BAD_URL;
} catch (java.lang.RuntimeException ex) {
/* probably an empty header set by javascript.
the same result as bad URL
error = EventHandler.ERROR_BAD_URL;
if (!ret) {
mListener.error(error, mListener.getContext().getText(
EventHandler.errorStringResources[Math.abs(error)]).toString());
* This function is used by handleCache to
* setup a load from the byte stream in a CacheResult.
private void startCacheLoad(CacheResult result) {
if (DebugFlags.FRAME_LOADER) {
Log.v(LOGTAG, "FrameLoader: loading from cache: "
+ mListener.url());
// Tell the Listener respond with the cache file
CacheLoader cacheLoader =
new CacheLoader(mListener, result);
mListener.setCacheLoader(cacheLoader);
if (mListener.isSynchronous()) {
cacheLoader.load();
// Load the cached file in a separate thread
WebViewWorker.getHandler().obtainMessage(
WebViewWorker.MSG_ADD_STREAMLOADER, cacheLoader).sendToTarget();
* This function is used by the handleHTTPLoad to setup the cache headers
* correctly.
* Returns true if the response was handled from the cache
private boolean handleCache() {
switch (mCacheMode) {
// This mode is normally used for a reload, it instructs the http
// loader to not use the cached content.
case WebSettings.LOAD_NO_CACHE:
// This mode is used when the content should only be loaded from
// the cache. If it is not there, then fail the load. This is used
// to load POST content in a history navigation.
case WebSettings.LOAD_CACHE_ONLY: {
CacheResult result = CacheManager.getCacheFile(mListener.url(),
mListener.postIdentifier(), null);
if (result != null) {
startCacheLoad(result);
// This happens if WebCore was first told that the POST
// response was in the cache, then when we try to use it
// it has gone.
// Generate a file not found error
int err = EventHandler.FILE_NOT_FOUND_ERROR;
mListener.error(err, mListener.getContext().getText(
EventHandler.errorStringResources[Math.abs(err)])
.toString());
// This mode is for when the user is doing a history navigation
// in the browser and should returned cached content regardless
// of it's state. If it is not in the cache, then go to the
// network.
case WebSettings.LOAD_CACHE_ELSE_NETWORK: {
if (DebugFlags.FRAME_LOADER) {
Log.v(LOGTAG, "FrameLoader: checking cache: "
+ mListener.url());
// Get the cache file name for the current URL, passing null for
// the validation headers causes no validation to occur
CacheResult result = CacheManager.getCacheFile(mListener.url(),
mListener.postIdentifier(), null);
if (result != null) {
startCacheLoad(result);
// This is the default case, which is to check to see if the
// content in the cache can be used. If it can be used, then
// use it. If it needs revalidation then the relevant headers
// are added to the request.
case WebSettings.LOAD_NORMAL:
return mListener.checkCache(mHeaders);
}// end of switch
* Add the static headers that don't change with each request.
private void populateStaticHeaders() {
// Accept header should already be there as they are built by WebCore,
// but in the case they are missing, add some.
String accept = mHeaders.get("Accept");
if (accept == null || accept.length() == 0) {
mHeaders.put("Accept", HEADER_STR);
mHeaders.put("Accept-Charset", "utf-8, iso-8859-1, utf-16, *;q=0.7");
String acceptLanguage = mSettings.getAcceptLanguage();
if (acceptLanguage.length() > 0) {
mHeaders.put("Accept-Language", acceptLanguage);
mHeaders.put("User-Agent", mSettings.getUserAgentString());
* Add the content related headers. These headers contain user private data
* and is not used when we are proxying an untrusted request.
private void populateHeaders() {
if (mReferrer != null) mHeaders.put("Referer", mReferrer);
if (mContentType != null) mHeaders.put(CONTENT_TYPE, mContentType);
// if we have an active proxy and have proxy credentials, do pre-emptive
// authentication to avoid an extra round-trip:
if (mNetwork.isValidProxySet()) {
/* The proxy credentials can be set in the Network thread */
synchronized (mNetwork) {
username = mNetwork.getProxyUsername();
password = mNetwork.getProxyPassword();
if (username != null && password != null) {
// we collect credentials ONLY if the proxy scheme is BASIC!!!
String proxyHeader = RequestHandle.authorizationHeader(true);
mHeaders.put(proxyHeader,
"Basic " + puteBasicAuthResponse(
username, password));
// Set cookie header
String cookie = CookieManager.getInstance().getCookie(
mListener.getWebAddress());
if (cookie != null && cookie.length() > 0) {
mHeaders.put("Cookie", cookie);

我要回帖

更多关于 skt blank个人资料 的文章

 

随机推荐