Skip to content

SocketChannel: Single or multi , which is better?

SocketChannel is thread safe, so only one channel is need for communication between client and server. the channel served for read/write operations simultaneously But, if we using multi channels (more than one connections between the same client and server), will the io performance be improved ??? If can, why…

Capturing speaker output in Java

Using Java is it possible to capture the speaker output? This output is not being generated by my program but rather by other running applications. Can this be done with Java or will I need to resort to C/C++? Answer I had a Java based app. that used Java Sound to tap into the sound flowing through the system…

Creating a string attribute in Weka Java API

I’m trying to create a new string Attribute using Weka’s Java API… Reading through the API javadocs, it appears that the way to do so is to use this constructor: but I’m stuck as to what I should pass into the attributeValues parameter… when I put in null, Java complains about pr…

Android: location; activity and service

I’m working on some application that should fetch current location and after device is located in some radius should be shown application with some message. I have a few questions. I’m trying to fetch location using If I use requestLocationUpdates then GPS is always working. And this is a waste of…