boolean (int fileId, int contentId, @NotNull RefCountingContentStorage contentStorage, @NotNull ContentHashEnumerator contentHashEnumerator) { try (DataInputStream stream = contentStorage.readStream(contentId)) { stream.readAllBytes(); } catch (IOException e) { LOG.warn("file[#" + fileId + "]: contentId(=" + contentId + ") content fails to resolve. " + e.getMessage()); return false; } try { byte[] hash = contentHashEnumerator.valueOf(contentId); if (hash == null) { LOG.warn("file[#" + fileId + "]: contentId(=" + contentId + ") content hash fails to resolve (null)"); return false; } } catch (IOException e) { LOG.warn("file[#" + fileId + "]: contentId(=" + contentId + ") content hash fails to resolve. " + e.getMessage()); return false; } return true; }