How can I use Javas signed byte type to store an 8 bit unsigned sample?
Basically, a byte is a storage container for 8 bits. Whether these 8 bits are used to store a signed or an unsigned numer is a matter of interpretation. Yes, Java always interprets bytes as signed. But they can be interpreted just the other way, too. The 8 bits can always represent 256 different bit patterns. In unsigned interpretation, these 256 bit patterns are interpreted as the decimal values 0 to 255. In signed interpretation, patterns are interpreted as the decimal values -128 to 127. The following table may help to understand this.