Permalink
Browse files

buffer url input stream returned by Using. fixes #437

  • Loading branch information...
harrah committed May 1, 2012
1 parent e844ad9 commit 1f6f5bb60c204fef320685c992cbc7178e737118
Showing with 1 addition and 1 deletion.
  1. +1 −1 util/io/Using.scala
View
@@ -78,7 +78,7 @@ object Using
def bufferedInputStream = wrap( (in: InputStream) => new BufferedInputStream(in) )
def fileOutputStream(append: Boolean = false) = file(f => new BufferedOutputStream(new FileOutputStream(f, append)))
def fileInputStream = file(f => new BufferedInputStream(new FileInputStream(f)))
- def urlInputStream = resource( (u: URL) => translate("Error opening " + u + ": ")(u.openStream))
+ def urlInputStream = resource( (u: URL) => translate("Error opening " + u + ": ")(new BufferedInputStream(u.openStream)))
def fileOutputChannel = file(f => new FileOutputStream(f).getChannel)
def fileInputChannel = file(f => new FileInputStream(f).getChannel)
def fileWriter(charset: Charset = IO.utf8, append: Boolean = false) =

0 comments on commit 1f6f5bb

Please sign in to comment.