當前位置: 首頁>>代碼示例>>Java>>正文


Java URL.decode方法代碼示例

本文整理匯總了Java中com.google.gwt.http.client.URL.decode方法的典型用法代碼示例。如果您正苦於以下問題:Java URL.decode方法的具體用法?Java URL.decode怎麽用?Java URL.decode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.http.client.URL的用法示例。


在下文中一共展示了URL.decode方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getTokenMap

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
public static HashMap<String, String> getTokenMap(String token) {
    token = URL.decode(token);
	String[] tokens = token.split(";");
	HashMap<String, String> tokenMap = new HashMap<String, String>();
	for( int i=0; i < tokens.length; i++ ) {
		if ( tokens[i].contains("=") ) {
			String[] parts = tokens[i].split("=");
			String name = parts[0];
			String value = parts[1];
			if ( !value.contains("ferret_") ) {
				tokenMap.put(name, value);
			}
		}
	}
	return tokenMap;
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:17,代碼來源:Util.java

示例2: TokenParser

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
public TokenParser(String token) {
	
	String[] tokens = token.split("\\" + TokenConstants.FilterMainSeparator, 2);
	
	primaryToken = URL.decode(tokens[0]);
	
	if (tokens.length > 1) {
		filters = new HashMap<String, String>();
		String[] filterComponents = tokens[1].split("\\" + TokenConstants.FilterSeparator, 0);
		for (String filter : filterComponents) {
			String[] keyValue = filter.split("\\" + TokenConstants.FilterKeyValueSeparator, 2);
			if (keyValue.length != 2)
				continue;
			filters.put(URL.decode(keyValue[0]), URL.decode(keyValue[1]));
		}
	} else {
		filters = null;
	}
	
}
 
開發者ID:vsite-hr,項目名稱:mentor,代碼行數:21,代碼來源:TokenParser.java

示例3: handleLinkClick

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
@UsedByApp
public void handleLinkClick(Event event) {
    Element target = Element.as(event.getEventTarget());
    String href = target.getAttribute("href");
    if (href.startsWith("send:")) {
        String msg = href.substring("send:".length());
        msg = URL.decode(msg);
        if (lastVisiblePeer != null) {
            messenger.sendMessage(lastVisiblePeer, msg);
            event.preventDefault();
        }
    } else {
        if (JsElectronApp.isElectron()) {
            JsElectronApp.openUrlExternal(href);
            event.preventDefault();
        }
    }
}
 
開發者ID:wex5,項目名稱:dangchat-sdk,代碼行數:19,代碼來源:JsFacade.java

示例4: checkLastQuery

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
private void checkLastQuery() {
	if (Window.Location.getParameter("q") != null) {
		iFilter.setValue(Window.Location.getParameter("q"), true);
		if (Window.Location.getParameter("t") != null) {
			if ("2".equals(Window.Location.getParameter("t"))) {
				iTabPanel.selectTab(1);
			} else {
				iTabPanel.selectTab(0);
			}
		} else {
			loadData();
		}
	} else if (Window.Location.getHash() != null && !Window.Location.getHash().isEmpty()) {
		String hash = URL.decode(Window.Location.getHash().substring(1));
		if (!hash.matches("^[0-9]+\\:?[0-9]*@?$")) {
			if (hash.endsWith("@")) {
				iFilter.setValue(hash.substring(0, hash.length() - 1), true);
				iTabPanel.selectTab(1);
			} else if (hash.endsWith("$")) {
				iFilter.setValue(hash.substring(0, hash.length() - 1), true);
				iTabPanel.selectTab(2);
			} else {
				iFilter.setValue(hash, true);
				loadData();
			}
		}
	} else {
		String q = SectioningStatusCookie.getInstance().getQuery(iOnline);
		if (q != null) iFilter.setValue(q);
		int t = SectioningStatusCookie.getInstance().getTab(iOnline);
		if (t >= 0 && t < iTabPanel.getTabCount()) {
			iTabPanel.selectTab(t, false);
			iTabIndex = -1;
		}
		if (GWT_CONSTANTS.searchWhenPageIsLoaded() && q != null && !q.isEmpty())
			loadData();
	}
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:39,代碼來源:SectioningStatusPage.java

示例5: decode

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
/**
    * Take in the XML request string and prepare it to be used to construct and LASRequest object.
    * @param xml -- the input XML off the servlet request.
    * @return xml -- the converted string
    */
public static String decode(String xml) {
       xml = URL.decode(xml);

       // Get rid of the entity values for > and <
       xml = xml.replace("&gt;", ">");
       xml = xml.replace("&lt;", "<");
       // Replace the op value with gt ge eq lt le as needed.
       xml = xml.replace("op=\">=\"", "op=\"ge\"");
       xml = xml.replace("op=\">\"", "op=\"gt\"");
       xml = xml.replace("op=\"=\"", "op=\"eq\"");
       xml = xml.replace("op=\"<=\"", "op=\"le\"");
       xml = xml.replace("op=\"<\"", "op=\"lt\"");
       return xml;
   }
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:20,代碼來源:Util.java

示例6: prepareFromRequest

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
@Override
public void prepareFromRequest(PlaceRequest request) {
    super.prepareFromRequest(request);
    _applicationName = request.getParameter(NameTokens.APPLICATION_NAME_PARAM, null);
    if (_applicationName != null) {
        _applicationName = URL.decode(_applicationName);
    }
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:9,代碼來源:ApplicationPresenter.java

示例7: prepareFromRequest

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
@Override
public void prepareFromRequest(PlaceRequest request) {
    super.prepareFromRequest(request);
    _artifactKey = request.getParameter(NameTokens.ARTIFACT_REFERENCE_KEY_PARAM, null);
    if (_artifactKey != null) {
        _artifactKey = URL.decode(_artifactKey);
    }
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:9,代碼來源:ArtifactPresenter.java

示例8: prepareFromRequest

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
@Override
public void prepareFromRequest(PlaceRequest request) {
    super.prepareFromRequest(request);

    _serviceName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.SERVICE_NAME_PARAM, null);
    _applicationName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.APPLICATION_NAME_PARAM, null);

    if (_serviceName != null) {
        _serviceName = URL.decode(_serviceName);
    }
    if (_applicationName != null) {
        _applicationName = URL.decode(_applicationName);
    }
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:15,代碼來源:ServicePresenter.java

示例9: prepareFromRequest

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
@Override
public void prepareFromRequest(PlaceRequest request) {
    super.prepareFromRequest(request);
    _componentName = request.getParameter(NameTokens.COMPONENT_NAME_PARAM, null);
    if (_componentName != null) {
        _componentName = URL.decode(_componentName);
    }
    _extensionName = request.getParameter(NameTokens.EXTENSION_NAME_PARAM, null);
    if (_extensionName != null) {
        _extensionName = URL.decode(_extensionName);
    }
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:13,代碼來源:ConfigPresenter.java

示例10: prepareFromRequest

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
@Override
public void prepareFromRequest(PlaceRequest request) {
    super.prepareFromRequest(request);

    _referenceName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.REFERENCE_NAME_PARAM, null);
    _applicationName = _placeManager.getCurrentPlaceRequest().getParameter(NameTokens.APPLICATION_NAME_PARAM, null);

    if (_referenceName != null) {
        _referenceName = URL.decode(_referenceName);
    }
    if (_applicationName != null) {
        _applicationName = URL.decode(_applicationName);
    }
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:15,代碼來源:ReferencePresenter.java

示例11: toFilyAppModuleId

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
public static String toFilyAppModuleId(String aRelative, String aStartPoint) {
	Element moduleIdNormalizer = com.google.gwt.dom.client.Document.get().createDivElement();
	moduleIdNormalizer.setInnerHTML("<a href=\"" + aStartPoint + "/" + aRelative + "\">o</a>");
	String mormalizedAbsoluteModuleUrl = URL.decode(moduleIdNormalizer.getFirstChildElement().<AnchorElement> cast().getHref());
	String hostContextPrefix = AppClient.relativeUri() + AppClient.getSourcePath();
	Element hostContextNormalizer = com.google.gwt.dom.client.Document.get().createDivElement();
	hostContextNormalizer.setInnerHTML("<a href=\"" + hostContextPrefix + "\">o</a>");
	String mormalizedHostContextPrefix = URL.decode(hostContextNormalizer.getFirstChildElement().<AnchorElement> cast().getHref());
	return mormalizedAbsoluteModuleUrl.substring(mormalizedHostContextPrefix.length());
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:11,代碼來源:AppClient.java

示例12: getFromHash

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
private String getFromHash(String hash, String param) {
	int paramIndex = hash.toLowerCase().indexOf(param.toLowerCase());
	
	if(!hash.isEmpty() && hash.charAt(0) == '#' && paramIndex != -1){
		int endIndex = hash.indexOf("/", paramIndex);
		if (endIndex != -1)
			return URL.decode(hash.substring(paramIndex + param.length(), endIndex));
		else
			return URL.decode(hash.substring(paramIndex + param.length()));
	}
	
	return null;
}
 
開發者ID:Rise-Vision,項目名稱:rva,代碼行數:14,代碼來源:PrerequisitesController.java

示例13: menuLoaded

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
protected void menuLoaded(LayerMenuItem menuTree) {
    if (menuTree.isLeaf()) {
        menuTree.addChildItem(new LayerMenuItem("No datasets found!", null, null, false, null));
    }
    layerSelector.populateLayers(menuTree);

    Window.setTitle(menuTree.getTitle());

    if (permalinking) {
        String bgMap = permalinkParamsMap.get("bgmap");
        if (bgMap != null && !"".equals(bgMap)) {
            try {
                mapArea.setBackgroundMap(bgMap);
            } catch (Exception e) {
                /*
                 * It doesn't matter if we can't set the background map, so
                 * ignore any exceptions
                 */
            }
        }
        String currentLayer = permalinkParamsMap.get("layer");
        if (currentLayer != null) {
            String serverUrl = permalinkParamsMap.get("server");
            if (serverUrl == null || "".equals(serverUrl)) {
                String path = Window.Location.getProtocol() + "//" + Window.Location.getHost()
                        + Window.Location.getPath();
                path = path.substring(0, path.lastIndexOf("/"));
                final String wmsUrl = path + "/wms";
                GWT.log("Permalinking without server argument.  Current WMS: " + wmsUrl);
                layerSelector.selectLayer(currentLayer, wmsUrl, false);
            } else {
                String currentWms = URL.decode(serverUrl);
                GWT.log("Permalinking with server argument.  Current WMS: " + currentWms);
                layerSelector.selectLayer(currentLayer, currentWms, false);
            }
        }
    }
}
 
開發者ID:Reading-eScience-Centre,項目名稱:edal-java,代碼行數:39,代碼來源:Godiva.java

示例14: getParameter

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
public static String getParameter(String name){
	String parameter = Window.Location.getParameter(name);
	if(parameter != null){
		parameter = URL.decode(parameter);
	}
	return parameter;		
}
 
開發者ID:metafora-project,項目名稱:ReflectionTool,代碼行數:8,代碼來源:UrlDecoder.java

示例15: popHistory

import com.google.gwt.http.client.URL; //導入方法依賴的package包/類
private void popHistory(boolean shouldAutoRefresh, String historyToken) {
    historyToken = URL.decode(historyToken);
    if (!historyToken.equals("")) {
        setUpdateRequired(true);
        // First split out the panel history
        String[] settings = historyToken.split("token");

        // The first token is the "gallery settings", the ones that follow
        // are for each output panel.
        // The number of panels in the history is settings.length - 1

        if (settings.length - 1 != xPanelCount) {
            setupOutputPanels(settings.length - 1, Constants.IMAGE);
            if (settings.length - 1 == 1) {
                setupMainPanelAndRefreshForceLASRequest(false);
                compareMenu.setSelectedIndex(0);
                compareMenuChanged();
            } else {
                setupPanelsAndRefreshNOforceLASRequestWithCompareMenus(false);
                if (settings.length - 1 == 2) {
                    compareMenu.setSelectedIndex(1);
                    compareMenuChanged();
                } else {
                    compareMenu.setSelectedIndex(2);
                    compareMenuChanged();
                }
            }
            // Set the state of the system...
        }

        HashMap<String, String> tokenMap = Util.getTokenMap(settings[0]);
        
       
        if ((tokenMap.containsKey("xDSID") && tokenMap.get("xDSID").equals(xVariable.getDSID()))
                && (tokenMap.containsKey("varid") && tokenMap.get("varid").equals(xVariable.getID()))) {
            // We can do this only because we are reusing the current
            // variable.

            applyTokens(settings);
            // Don't request that the plot refresh happen automatically,
            // don't force panels to update if they don't need to, and don't
            // add to the history stack.
            eventBus.fireEvent(new WidgetSelectionChangeEvent(shouldAutoRefresh, false, false));
        } else {
            historyString = historyToken;
            historyTokens = tokenMap;
            Util.getRPCService().getCategories(tokenMap.get("xCATID"), tokenMap.get("xDSID"), requestGridForHistory);
        }
    }
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:51,代碼來源:UI.java


注:本文中的com.google.gwt.http.client.URL.decode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。