boolean (@NotNull Path path) { try (InputStream is = Files.newInputStream(path, StandardOpenOption.READ, LinkOption.NOFOLLOW_LINKS)) { byte[] head = is.readNBytes(2); if (head.length < 2) { return false; } return head[0] == 0x50 && head[1] == 0x4b; } catch (IOException e) { return false; } }