How do you know that the server is sending you 5 bytes in return?
Maybe try using a normal read and see what happens.
Even a very slow server / network should be able to do 5 bytes in 10 seconds.
try this code
for (int x = 0; x < 5; x++) {
byte[] received = new byte[1];
data.readFully(received);
System.out.println (new String (received));
}