public static boolean isBundle(Path file) {
        if (!Files.isRegularFile(file)) {
            return false;
        }

        try (InputStream is = Files.newInputStream(file)) {
            byte[] header = new byte[8];
            is.read(header);
            String headerString = new String(header, PROP_CHARSET);
            return headerString.equals(BundleHeader.SIGNATURE_WEB)
                    || headerString.equals(BundleHeader.SIGNATURE_RAW);
        } catch (IOException ex) {
            return false;
        }
    }
Asset bundle file utility class.

@author Nico Bergemann <barracuda415 at yahoo.de>
disunity-core/src/main/java/info/ata4/junity/bundle/BundleUtils.java