List of usage examples for java.net URI toASCIIString
public String toASCIIString()
From source file:com.jaeksoft.searchlib.remote.UriWriteStream.java
public UriWriteStream(URI uri, File file) throws IOException { HttpPut httpPut = new HttpPut(uri.toASCIIString()); httpPut.setConfig(requestConfig);// w w w. ja v a 2 s . c o m FileEntity fre = new FileEntity(file, ContentType.DEFAULT_BINARY); httpPut.setEntity(fre); execute(httpPut); }
From source file:org.mycore.common.xml.MCRXMLFunctions.java
/** * Encodes the given URL so, that it is a valid RFC 2396 URL. *//*from w w w .ja v a 2 s. c om*/ public static String normalizeAbsoluteURL(String url) throws MalformedURLException, URISyntaxException { try { return new URI(url).toASCIIString(); } catch (Exception e) { URL testURL = new URL(url); URI uri = new URI(testURL.getProtocol(), testURL.getUserInfo(), testURL.getHost(), testURL.getPort(), testURL.getPath(), testURL.getQuery(), testURL.getRef()); return uri.toASCIIString(); } }
From source file:com.fortify.bugtracker.tgt.octane.connection.OctaneRestConnectionConfig.java
@Override protected void setBaseUrl(URI baseUrl) { String baseUrlString = baseUrl.toASCIIString(); baseUrlString = StringUtils.removeEnd(baseUrlString, "/"); baseUrlString = StringUtils.removeEnd(baseUrlString, "ui"); super.setBaseUrl(URI.create(baseUrlString)); }
From source file:org.fcrepo.client.utils.HttpCopy.java
/** * Create an HTTP COPY request./* www . j av a2 s .co m*/ * * @param source * Source URL. * @param destination * Destination URL. **/ public HttpCopy(final URI source, final URI destination) { this.setHeader(HttpHeaders.DESTINATION, destination.toASCIIString()); this.setURI(source); }
From source file:org.fcrepo.client.utils.HttpMove.java
/** * Create an HTTP MOVE request.// w w w. j a v a 2 s . c o m * * @param source * Source URL. * @param destination * Destination URL. **/ public HttpMove(final URI source, final URI destination) { this.setHeader(HttpHeaders.DESTINATION, destination.toASCIIString()); this.setURI(source); }
From source file:org.apache.taverna.scufl2.translator.t2flow.defaultactivities.ApiConsomerActivityParser.java
@Override public boolean canHandlePlugin(URI activityURI) { String activityUriStr = activityURI.toASCIIString(); return activityUriStr.startsWith(activityRavenURI.toASCIIString()) && activityUriStr.endsWith(activityClassName); }
From source file:org.apache.taverna.scufl2.translator.t2flow.defaultactivities.WSDLXMLSplitterParser.java
@Override public boolean canHandlePlugin(URI activityURI) { String activityUriStr = activityURI.toASCIIString(); if (!activityUriStr.startsWith(wsdlActivityRavenURI.toASCIIString())) return false; return activityUriStr.endsWith(inputSplitterClassName) || activityUriStr.endsWith(outputSplitterClassName); }
From source file:org.apache.taverna.scufl2.translator.t2flow.defaultactivities.WSDLActivityParser.java
@Override public boolean canHandlePlugin(URI activityURI) { String activityUriStr = activityURI.toASCIIString(); if (!activityUriStr.startsWith(wsdlActivityRavenURI.toASCIIString())) return false; if (activityUriStr.endsWith(wsdlActivityClassName)) return true; return false; }
From source file:org.apache.taverna.scufl2.translator.t2flow.defaultactivities.WSDLXMLSplitterParser.java
@Override public URI mapT2flowRavenIdToScufl2URI(URI t2flowActivity) { String activityUriStr = t2flowActivity.toASCIIString(); if (activityUriStr.endsWith(inputSplitterClassName)) return XML_INPUT_SPLITTER; else if (activityUriStr.endsWith(outputSplitterClassName)) return XML_OUTPUT_SPLITTER; throw new IllegalArgumentException("Unexpected URI " + t2flowActivity); }
From source file:com.subgraph.vega.impl.scanner.VegaHttpRequest.java
private String getUriText() { final URI u = getURI(); if (u == null) return "/"; else/* ww w .j a v a2 s .c o m*/ return u.toASCIIString(); }