/** * Decode the base-64 encoded text into a byte array, check the magic string at the start of the * file, and decompress it. * * @param base64Data the base64 data to decode * @return the byte array containing the decoded data. * @throws an exception if it is not an MVD file */ private static byte[] base64Decode(String base64Data) throws Exception { byte[] data = Base64.decode(base64Data); if (!magicOK(data)) throw new MVDException("Not a valid MVD file"); return data; }