assertString method
Reads a string of the same length as s
, then checks that the read string
matches s
. Throws a FormatException if they don't match. s
must be
ASCII only.
Implementation
void assertString(String s) {
if (!_checkString(s)) {
throw FormatException('WAV is corrupted, or not a WAV file.');
}
}