I'm having some trouble understanding the OutputStream write(int b) method.
When I read the javadoc for this method, it says it 'writes byte b' to the output stream; whether it's the abstract method in OutputStream or the implemented method in, say, FileOutputStream.
So what I don't understand is, if the argument is an integer, and the method writes it as a byte, isn't there a high probability for loss of data when the integer value exceeds what a byte can hold?
Enlightenment is humbly accepted.
Vic
When I read the javadoc for this method, it says it 'writes byte b' to the output stream; whether it's the abstract method in OutputStream or the implemented method in, say, FileOutputStream.
So what I don't understand is, if the argument is an integer, and the method writes it as a byte, isn't there a high probability for loss of data when the integer value exceeds what a byte can hold?
Enlightenment is humbly accepted.
Vic