public final static int APE_DESCRIPTOR_BYTES = 52;
public static APEDescriptor read(final File file) throws IOException {
try {
APEDescriptor header = new APEDescriptor();
final ByteArrayReader reader = new ByteArrayReader(file, APE_DESCRIPTOR_BYTES - 16);
header.cID = reader.readString(4, "US-ASCII");
header.nVersion = reader.readUnsignedShort();
reader.skipBytes(2);
header.nDescriptorBytes = reader.readUnsignedInt();
header.nHeaderBytes = reader.readUnsignedInt();
header.nSeekTableBytes = reader.readUnsignedInt();
header.nHeaderDataBytes = reader.readUnsignedInt();
header.nAPEFrameDataBytes = reader.readUnsignedInt();
header.nAPEFrameDataBytesHigh = reader.readUnsignedInt();
header.nTerminatingDataBytes = reader.readUnsignedInt();
file.readFully(header.cFileMD5);
return header;
} catch (EOFException e) {
throw new JMACException("Unsupported Format");
}