Package org.cytoscape.io.util
Interface StreamUtil
public interface StreamUtil
A stateless utility class that provides special handling to support
InputStreams and URLConnections over the network. If you intend to
support the use of proxy servers, you should use this service.
Module: io-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>io-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetInputStream(String source)
Gets the input stream from given a string.getInputStream(URL source)
Gets the input stream from givenURL
.getURLConnection(URL source)
Obtain aURLConnection
for a givenURL
.
-
Field Details
-
URL_PATTERN
- See Also:
- Constant Field Values
-
-
Method Details
-
getInputStream
Gets the input stream from given a string. Attempts to determine if the string is a URL or a File and then creates the appropriate InputStream. Proxy will be used if available.- Parameters:
source
- The string from which to generate the InputStream.- Returns:
- An input stream from the specified string.
- Throws:
IOException
-
getInputStream
Gets the input stream from givenURL
. Proxy will be used if available.- Parameters:
source
- The URL from which to generate the InputStream.- Returns:
- An input stream from the specified URL.
- Throws:
IOException
-
getURLConnection
Obtain aURLConnection
for a givenURL
. Proxy will be used if available.- Parameters:
source
- The URL from which to generate the URLConnection.- Returns:
- An URLConnection from the specified URL.
- Throws:
IOException
-