Are there any real life uses for the Java byte primitive type?
- by Thorbjørn Ravn Andersen
For some inexplicable reason the byte primitive type is signed in Java. This mean that valid values are -128..127 instead of the usual 0..255 range representing 8 significant bits in a byte (without a sign bit).
This mean that all byte manipulation code usually does integer calculations and end up masking out the last 8 bits.
I was wondering if…