@Override public String implProbeContentType(Path obj) throws IOException { if (!gioAvailable) return null; if (!(obj instanceof UnixPath)) return null; UnixPath path = (UnixPath) obj; NativeBuffer buffer = NativeBuffers.asNativeBuffer(path.getByteArrayForSysCalls()); try { // GIO may access file so need permission check path.checkRead(); byte[] type = probeGio(buffer.address()); return (type == null) ? null : Util.toString(type); } finally { buffer.release(); } }