I'm in the process of understanding Datagrams, and i understand that it is connectionless protocol... so my question is, if i send some data to a server, and leave that socket open for continuous listening, can an unauthorized host spam my socket?
In Java will it though any kind of exception to reject data from the unauthorized host?
No, a Socket isn't vulnerable to that. A ServerSocket is open for listening to anyone who wants to connect, but a Socket is used only for connections to a particular port on a particular host. No other host can connect to it.