If I need to send several byte array(e.g. 1 for public key, 1 for enctypted data) through socket, how can tell the I/O stream that "this is the end of this byte array, i am going to send/receive another one".
Moreover, if I send a byte array with the size > 65535, I get SocketOutputStream exception...is 65535 the limit of socket?