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 Details

  • Method Details

    • 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