Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 27th, 2012  |  syntax: Scala  |  size: 0.32 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         val is: DataInputStream = new DataInputStream(new FileInputStream("/Users/peter/workspace/levels.mrg"));
  2.         Stream.continually(
  3.                 for (i <- 0 until is.readInt()) println(new String(Stream.continually(is.read()).drop(4).takeWhile(_ != 0).toArray.map(_.asInstanceOf[Char])))
  4.         ).take(3).toArray;