Java Utililty Methods URL Load

List of utility methods to do URL Load

Description

The list of methods to do URL Load are organized into topic(s).

Method

StringloadFully(URL url)
load Fully
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buf = new byte[4096];
int l;
InputStream is = url.openStream();
try {
    while ((l = is.read(buf)) >= 0) {
        baos.write(buf, 0, l);
} finally {
    is.close();
return baos.toString();
ListloadImplementations(URL url, ClassLoader loader)
load Implementations
InputStream inputStream = url.openStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
String classLine = reader.readLine();
ArrayList<Class> classList = new ArrayList<>();
while (classLine != null) {
    Class clz = loader.loadClass(classLine);
    classList.add(clz);
    classLine = reader.readLine();
...
ManifestloadManifest(URL url)
Loads a manifest from the given URL
if (url == null) {
    return null;
InputStream in = url.openStream();
try {
    return new Manifest(in);
} finally {
    in.close();
...
ObjectloadObject(URL url)
load Object
return loadObject(url, false);
PropertiesloadProperties(final URL url)
Loads a property file from given URL.
Properties newprops = new Properties();
InputStream in = null;
try {
    in = url.openStream();
    newprops.load(in);
} finally {
    close(in);
return newprops;
voidloadProperties(Properties p, URL url)
load Properties
InputStream propIn = url.openStream();
try {
    p.load(propIn);
} finally {
    closeStream(propIn);
PropertiesloadProperties(URL url)
load Properties
try {
    return loadProperties(url.openStream());
} catch (Exception e) {
return null;
PropertiesloadProperties(URL url)
load Properties
Properties props = null;
try {
    InputStream stream = url.openStream();
    props = new Properties();
    props.load(stream);
} catch (Exception e) {
} finally {
return props;
PropertiesloadPropertiesFromFileOrURL(String propertiesFile)
Create a java properties object from a location.
if (propertiesFile == null || propertiesFile.length() == 0) {
    throw new IOException("No file provided");
InputStream inputStream = null;
String location;
String parentFolder;
try {
    URL temp = new URL(propertiesFile);
...
PropertiesloadPropertiesFromURL(URL url)
load Properties From URL
InputStream is = null;
try {
    is = url.openStream();
    Properties prop = new Properties();
    prop.load(is);
    return prop;
} finally {
    is.close();
...