Java URL to InputStream openStream(URL url)

Here you can find the source of openStream(URL url)

Description

open Stream

License

Apache License

Declaration

public static InputStream openStream(URL url) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;

import java.net.URL;

public class Main {
    public static InputStream openStream(URL url) {
        try {/*from  w ww .  ja va 2  s  .  com*/
            return url.openStream();
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
}

Related

  1. openFileOrURL(String name)
  2. openInputStream(URL url)
  3. openStream(String urlStr)
  4. openStream(URL url)
  5. openStream(URL url)
  6. openStream(URL url)
  7. openStream(URL url)
  8. openStream(URL url)
  9. openStream(URL url)