byte (@NotNull VirtualFile file) { boolean wasAutoDetectRun = false; byte status = 0; try (DataInputStream stream = autoDetectedAttribute.readFileAttribute(file)) { status = stream == null ? 0 : stream.readByte(); wasAutoDetectRun = stream != null; } catch (IOException ignored) { } status = BitUtil.set(status, AUTO_DETECT_WAS_RUN_MASK, wasAutoDetectRun); return (byte)(status & (AUTO_DETECTED_AS_TEXT_MASK | AUTO_DETECTED_AS_BINARY_MASK | AUTO_DETECT_WAS_RUN_MASK)); }