public class ResourceLoader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_REDIRECTS
The maximum number of redirects to follow before throwing an IOException.
|
Constructor and Description |
---|
ResourceLoader() |
Modifier and Type | Method and Description |
---|---|
static java.net.URLConnection |
urlConnection(java.net.URL url)
Open a URLConnection to the resource identified by the URI.
|
static java.io.InputStream |
urlStream(java.net.URL url)
Open a stream to retrieve the content identified by the URI.
|
public static int MAX_REDIRECTS
public static java.net.URLConnection urlConnection(java.net.URL url) throws java.io.IOException
url
- The URL to retrieve.java.io.IOException
- If more than MAX_REDIRECTS are occur or if a loop is detected.public static java.io.InputStream urlStream(java.net.URL url) throws java.io.IOException
url
- The URL to retrieve.java.io.IOException
- If more than MAX_REDIRECTS are occur or if a loop is detected.Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.