Problems with sending bytearray with high dimensio

I have do an client server application.
But i have a problem when i must send a big message (>4000Bytes) in socketchannel

The write method suceed.

But when i read the message from socket channel, this result
divided in more pieces.

Why?

How can i manage the big message?

Thanks.