No, it is not ok without specifying the same encoding on conversion from and to bytes. This is because Java will use the default encoding, and those may be different on different servers.
So, say on the sender side you have default cp1252 (i.e. Windows host), but on the server site you have UTF-8 (Linux). Then you'll get garbage as soon as you have non-ASCII characters.
This is maybe hard to detect. For one, all your servers could have the same default encoding (like, if you run the client and the server on the same host). Second, make sure your test data contain some non-ASCII characters, like the € sign, Umlauts or even chinese characters.
Remember, even if presently client/server do run on the same host: Do it robust and correct from the beginning, so as to remove the restriction that your SW will only run correctly when client and server are on similar platforms.