मैं कुछ scripting in Scala ऐसा करने के लिए, कुछ लॉग फाइल संसाधित करने का प्रयास किया गया था में एक java.nio.BufferUnderflowException मिलता है:क्यों मैं इस स्काला
scala> import io.Source
import io.Source
scala> import java.io.File
import java.io.File
scala> val f = new File(".")
f: java.io.File = .
scala> for (l <- f.listFiles) {
| val src = Source.fromFile(l).getLines
| println((0 /: src) { (i, line) => i + 1 })
| }
3658
java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Unknown Source)
at java.nio.HeapCharBuffer.get(Unknown Source)
at scala.io.BufferedSource$$anon$2.next(BufferedSource.scala:86)
at scala.io.BufferedSource$$anon$2.next(BufferedSource.scala:74)
at scala.io.Source$$anon$6.next(Source.scala:307)
at scala.io.Source$$anon$6.next(Source.scala:301)
at scala.Iterator$cla...
मैं इस java.nio.BufferUnderflowException
क्यों मिलता है?
नोट - मैं 10 लॉग फाइल, प्रत्येक प्रसंस्करण कर रहा हूँ 1 एमबी के बारे में आकार में