Let\'s say I have a serializable class AppMessage.
AppMessage
I would like to transmit it as byte[] over sockets to another machine where it is rebuil
byte[]
Another interesting method is from com.fasterxml.jackson.databind.ObjectMapper
com.fasterxml.jackson.databind.ObjectMapper
byte[] data = new ObjectMapper().writeValueAsBytes(JAVA_OBJECT_HERE)
Maven Dependency
com.fasterxml.jackson.core jackson-databind