Never mind. I figured it out. If I know my sample rate, sample size in bits,channels, whether it is signed, and whether it is bigEndian, I can use this constructor:
AudioFormat(float sampleRate, int sampleSizeInBits, int channels, boolean signed, boolean bigEndian)
to create an AudioFormat object. For example:
AudioFormat af = new AudioFormat(11025, 8, 1, false, false); // an 8-bit, mono PCM (like a WAV) at 11025khz
With that object, I can create a DataLine.Info object:
DataLine.Info info = new DataLine.Info(Clip.class, af, 1024); // not sure what the buffer is for yet, but 1024 seems fine for now
then create a Line as a Clip, open it, and start it playing:
Clip c = (Clip) AudioSystem.getLine(info);
c.open(af, b, 0, b.length);
c.start();
Lastly, I remove the header from the byte array so the click goes away.
int headerSize = 64; // not actual size. Brute force, actually. :-)
for (int i=0; i<headerSize; i++) {
b = -126; // signed byte of 1; 1 seems to work better than 0 for some reason?
}
So, if I know exactly what format my sounds are in, I can play them without the click. (Interestingly, loop() still has a click, so I guess I would write a sound player with a loop() command that finds the sound's duration and just does start() again.)
I hope this is useful for somebody else who wants to play streamed sounds in an applet without a click.
Now to search for (or implement!) the equivalent of AudioFileStream.getFormat(), so the sound file's format doesn't have to be known beforehand... if anybody has a suggestion, I'd love to hear it.