buffer url input stream returned by Using. fixes #437

This commit is contained in:
Mark Harrah 2012-04-30 20:50:28 -04:00
parent e537cbc474
commit 9f80180859
1 changed files with 1 additions and 1 deletions

View File

@ -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) =