how to write char array to java socketchannel. I am not able to write the char data to socketchannel as it takes ByteBuffer.
Have you tried using putChar method of ByteBuffer?
ByteBuffer buf = ByteBuffer.allocate(1024);
for (char ch : myChars) {
buf.putChar(ch);
}