   [java] Alternatives to using blocking Readers?
  Hi! I was wondering if there's an alternative to using blocking readers. I've been looking for non-blocking alternatives but I haven't found anything in the API. I'm creating a simple network application; currently the client sends a String to the server which the server then prints. This is to be expanded into a game server later on (it's on its baby steps atm). Naturally I don't want the readers to block the execution. So, is there an alternative or will I have to start a new thread whenever I want to read data from the client?   
  You'll want to take a look at the java.nio package. Here's a tutorial to help you along the way.Son Of Cain   ;  I'm writing the EXACT same program, lol, and I'm using encapsulated classes which handle the input/output for themselves which implement the Runnable Interfasce, thereby allowing multiple to run at the same time if necessary. You might want to check out the java.NIO package if you're looking to actually use non-blocking IO interfaces though, as they are PROBABNLY more effective than what I've got going. There ARE nonblocking socket classes and such there as well, so you really may want to check that package.EDIT: well damn, he beat me to it :/ oh well.   ;  You could also look at my code on my site. It may be a bit more complicated internally than what you had in mind. Externally, it's very easy to use. So if your aim is to use non-blocking networking without grappling with java.nio, feel free to use my package however you like. I've put in the hours so you don't have to!   ;  Thanks everyone. I chose to write a class that handles that with it's own thread if you are interested, and also if you're not.   