mirror of
https://github.com/i2p/i2p.i2p.git
synced 2024-12-06 19:27:00 +01:00
i2psnark: Larger read buffer for large files
This commit is contained in:
@@ -472,6 +472,8 @@ class BasicServlet extends HttpServlet
|
||||
/* ------------------------------------------------------------ */
|
||||
public InputStream getInputStream() throws IOException
|
||||
{
|
||||
if (getContentLength() > 4*1024*1024)
|
||||
return new BufferedInputStream(new FileInputStream(_file), 64*1024);
|
||||
return new BufferedInputStream(new FileInputStream(_file));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user