buffer the input stream for loading properties

This commit is contained in:
Havoc Pennington 2011-11-12 17:44:18 -05:00
parent b1b2403a5d
commit d5fba4b8a7

View File

@ -1,5 +1,6 @@
package com.typesafe.config.impl;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@ -50,6 +51,7 @@ final class Loader {
InputStream stream = null;
try {
stream = url.openStream();
stream = new BufferedInputStream(stream);
props.load(stream);
} catch (IOException e) {
throw new ConfigException.IO(origin, "failed to open url", e);