Maybe someone can help me understand, because I feel that I am missing something that is likely to affect my program.
I am using ByteArrayOutputStream. If I have not missed something huge, then this class should create a byte [] array for other uses.
However, the "simple" write function in BAOS accepts int not bytes ( ByteArrayOutputStream.write ).
According to this ( Primitive Data Types ), in Java, int is a 32-bit data type, and a byte is an 8-bit data type.
If I write this code ...
int i = 32;
byte b = i;
I get a warning about possible lossy transformations requiring a change to this ...
int i = 32;
byte b = (byte)i;
I am really confused about the entry (int) ...