What\'s the difference between writeBytes(str) vs write(str) in DataOutputStream?
And is there any Tips/Tricks to use them?
Thanks in adva
In DataOutputStream, in reference to the oracle documentation (http://docs.oracle.com/javase/7/docs/api/java/io/DataOutputStream.html) there isn't any method named write(String) but only write(byte[]), write(byte[] b, int off, int len) and write(int b). So, if you have a String, the simplest method you can use is writeBytes(String).
There is no difference between those methods, only use the proper one according to your needs (the type of the object your data are stored in).