Functional programming approach for Java's input/output streams

Posted by Elazar Leibovich on Stack Overflow See other posts from Stack Overflow or by Elazar Leibovich
Published on 2010-06-01T07:34:34Z Indexed on 2010/06/01 7:43 UTC
Read the original article Hit count: 234

I'm using Java's DataInputStream with scala to parse some simple binary file (which is very bad exprerience due to the lack of unsigned types, even in scala, but that's a different story).

However I find myself forced to use mutable data structure, since Java's streams are inherently state preserving entities.

What's a good design to wrap Java's streams with nice functional data structure?

© Stack Overflow or respective owner

Related posts about scala

Related posts about functional-programming