private void stream(StreamHeader streamHeader, DataInputStream input) throws IOException
{
EncryptionOptions options = DatabaseDescriptor.getEncryptionOptions();
if (options != null && options.internode_encryption == EncryptionOptions.InternodeEncryption.all)
new SSLIncomingStreamReader(streamHeader, socket, input).read();
else
new IncomingStreamReader(streamHeader, socket).read();
}