Cytoscape 3.0.1 API

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.


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
static String URL_PATTERN
           
 
Method Summary
 InputStream getInputStream(String source)
          Gets the input stream from given a string.
 InputStream getInputStream(URL source)
          Gets the input stream from given URL.
 URLConnection getURLConnection(URL source)
          Obtain a URLConnection for a given URL.
 

Field Detail

URL_PATTERN

static final String URL_PATTERN
See Also:
Constant Field Values
Method Detail

getInputStream

InputStream getInputStream(String source)
                           throws IOException
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

InputStream getInputStream(URL source)
                           throws IOException
Gets the input stream from given URL. 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

URLConnection getURLConnection(URL source)
                               throws IOException
Obtain a URLConnection for a given URL. 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

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.