How to determine if 8bit WAV File is signed or unsigned, using Java and without javax.sound

arrays, java, signed, unsigned, wav

Solution

In the wav File, 8-bit samples are stored as unsigned bytes, ranging from 0 to 255. The 16-bit samples are stored as signed integers in 2's-complement.

Problem

I need to know whether a ".wav" of 8bits, is signed or unsigned PCM, by only reading file. I cannot use "javax.sound.sampled.*" or AudioSystem libraries.

Original source