title: File Streaming using Java similar to node.js
body: <p>I was going over a nodejs tutorial which mentioned that Node.JS does not keep the file in memory when writes files to a disk and it flushes chunks of file to disk as and when it receives it. Is Java capable of handling file in a similar fashion or does it keep the entire file in memory before flushing to disk? In the past , I have faced out of memory exception when I tried to upload files using servlets.</p>