Most sensible Java programmers know that garbage collection is no substitute for careful de-allocation of resources. In Java that a class typically allows you to do this on a per object basis with the close method. On .net, this the … Continue reading
Must remember than SelectionKey.attachment is evil and should never be used to store anything that has a handle on a buffer.
Method declarations use the def keyword and follow’s Scalas syntax rules of putting the type after the symbol for argument variables. In our send method below, the statements within look a lot like Java code with some minor differences: On … Continue reading
Scala classes are public by default. It Java, to define a class with a field, you need to define the field an argument in the constructor for that field and an assignment from the argument to the field to initialise … Continue reading
I’ve taken the ROX NIO tutorial code, fixed it up a bit, translated it to Scala and uploaded both the Scala and Java to https://offsync.googlecode.com/svn/tags/rox-nio-tutorial-source I’ll be looking at some of the differences between the Scala and Java code.
I highly recommend the ROX Java NIO Tutorial for learning about Java NIO. Java NIO made no sense to me whatsoever until I read this page.