public class TransportUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
TransportUtil.TextContentProcessor
Extend to process character content.
|
| Constructor and Description |
|---|
TransportUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
copyStream(java.io.InputStream in,
boolean closeIn,
java.io.OutputStream out,
boolean closeOut) |
static void |
downloadResource(java.net.URI location,
java.io.File target,
IProgressMonitor monitor)
Download an HTTP-based resource
|
static java.lang.String |
getFileNameFor(java.lang.String bundleUrl) |
static void |
readResource(java.net.URI location,
TransportUtil.TextContentProcessor processor,
IProgressMonitor monitor)
Read a web-based resource at the specified location using the given processor.
|
static boolean |
verifyAvailability(java.util.List<? extends java.net.URI> locations,
boolean one,
IProgressMonitor monitor)
Verify availability of resources at the given web locations.
|
public static void downloadResource(java.net.URI location,
java.io.File target,
IProgressMonitor monitor)
throws java.io.IOException,
CoreException
target - the target file to which the content is savedlocation - the web location of the contentmonitor - the monitorjava.io.IOException - if a network or IO problem occursCoreExceptionpublic static int copyStream(java.io.InputStream in,
boolean closeIn,
java.io.OutputStream out,
boolean closeOut)
throws java.io.IOException
java.io.IOExceptionpublic static void readResource(java.net.URI location,
TransportUtil.TextContentProcessor processor,
IProgressMonitor monitor)
throws java.io.IOException,
CoreException
location - the web location of the contentprocessor - the processor that will handle contentmonitor - the monitorjava.io.IOException - if a network or IO problem occursCoreExceptionpublic static boolean verifyAvailability(java.util.List<? extends java.net.URI> locations,
boolean one,
IProgressMonitor monitor)
throws java.io.IOException,
CoreException
locations - the locations of the resource to verifyone - indicate if only one of the resources must existmonitor - the monitorCoreExceptionAuthenticationFailedExceptionjava.io.IOExceptionpublic static java.lang.String getFileNameFor(java.lang.String bundleUrl)