@Test public void testIsMSIFile() throws Exception { assertFalse(MSIFile.isMSIFile(new File("pom.xml"))); assertTrue(MSIFile.isMSIFile(new File("target/test-classes/minimal.msi"))); }
public static boolean isMSIFile(File file) throws IOException { try (DataInputStream in = new DataInputStream(new FileInputStream(file))) { return in.readLong() == MSI_HEADER; } }
MSIFile implements Signable, Closeable { public static boolean isMSIFile(File file) throws IOException { try (DataInputStream in = new DataInputStream(new FileInputStream(file))) { return in.readLong() == MSI_HEADER; } } }
MSIFile implements Signable, Closeable { public static boolean isMSIFile(File file) throws IOException { try (DataInputStream in = new DataInputStream(new FileInputStream(file))) { return in.readLong() == MSI_HEADER; } } MSIFile(File file);  MSIFile(final SeekableByteChannel channel); }
MSIFile implements Signable, Closeable { public static boolean isMSIFile(File file) throws IOException { try (DataInputStream in = new DataInputStream(new FileInputStream(file))) { return in.readLong() == MSI_HEADER; } } MSIFile(File file);  MSIFile(final SeekableByteChannel channel); static boolean isMSIFile(File file); void close(); boolean hasExtendedSignature(); @Override byte[] computeDigest(MessageDigest digest); @Override ASN1Object createIndirectData(DigestAlgorithm digestAlgorithm); @Override List<CMSSignedData> getSignatures(); @Override void setSignature(CMSSignedData signature); @Override void save(); }
MSIFile implements Signable, Closeable { public static boolean isMSIFile(File file) throws IOException { try (DataInputStream in = new DataInputStream(new FileInputStream(file))) { return in.readLong() == MSI_HEADER; } } MSIFile(File file);  MSIFile(final SeekableByteChannel channel); static boolean isMSIFile(File file); void close(); boolean hasExtendedSignature(); @Override byte[] computeDigest(MessageDigest digest); @Override ASN1Object createIndirectData(DigestAlgorithm digestAlgorithm); @Override List<CMSSignedData> getSignatures(); @Override void setSignature(CMSSignedData signature); @Override void save();  }