CaseSensitivity () { if (!isDirectory()) { return CaseSensitivity.UNKNOWN; } int sensitivity_flags = (flags >> CASE_SENSITIVITY_SHIFT) & 0b11; switch (sensitivity_flags) { case 0b00: return CaseSensitivity.UNKNOWN; case 0b01: return CaseSensitivity.SENSITIVE; case 0b10: return CaseSensitivity.INSENSITIVE; } throw new IllegalStateException("Invalid sensitivity flags: " + Integer.toBinaryString(sensitivity_flags)); }