Skip to content

Instantly share code, notes, and snippets.

View sjvkishore's full-sized avatar

KishoreSJV sjvkishore

View GitHub Profile
@sjvkishore
sjvkishore / MemoryMapInputStream.scala
Created May 14, 2017 09:03 — forked from zentrope/MemoryMapInputStream.scala
Scala InputStream for Memory Mapped File
// Just an example of some code I ended up not using, but which is kinda neat.
object Utils {
def linesFromFile(file: File) = {
io.Source.fromInputStream(getMemoryMappedFileInputStream(file)).getLines
}
def getMemoryMappedFileInputStream(file: File): InputStream = {