All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stormpath.sdk.impl.io.UrlResource Maven / Gradle / Ivy

Go to download

The Stormpath Java SDK core implemenation .jar is used at runtime to support API invocations. This implementation jar should be a runtime dependency only and should NOT be depended on at compile time by your code. The implementations within this jar can change at any time without warning - use it with runtime scope only.

There is a newer version: 2.0.4-okta
Show newest version
package com.stormpath.sdk.impl.io;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

public class UrlResource extends AbstractResource {

    public static final String SCHEME = "url";
    public static final String SCHEME_PREFIX = SCHEME + ":";

    public UrlResource(String location) {
        super(location);
    }

    @Override
    protected String getScheme() {
        return SCHEME;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        URL url = new URL(getLocation());
        return url.openStream();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy