src/share/classes/java/nio/file/spi/FileTypeDetector.java
Print this page
@@ -23,11 +23,11 @@
* questions.
*/
package java.nio.file.spi;
-import java.nio.file.FileRef;
+import java.nio.file.Path;
import java.io.IOException;
/**
* A file type detector for probing a file to guess its file type.
*
@@ -40,11 +40,11 @@
* <em>file extension</em> (a convention used in some platforms) and map it to
* a file type. In other cases, the file type may be stored as a file <a
* href="../attribute/package-summary.html"> attribute</a> or the bytes in a
* file may be examined to guess its file type.
*
- * @see java.nio.file.Files#probeContentType(FileRef)
+ * @see java.nio.file.Files#probeContentType(Path)
*
* @since 1.7
*/
public abstract class FileTypeDetector {
@@ -81,12 +81,12 @@
* defined by <a href="http://www.ietf.org/rfc/rfc2045.txt"><i>RFC 2045:
* Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet
* Message Bodies</i></a>. The string must be parsable according to the
* grammar in the RFC 2045.
*
- * @param file
- * The file to probe
+ * @param path
+ * the path to the file to probe
*
* @return The content type or {@code null} if the file type is not
* recognized
*
* @throws IOException
@@ -99,8 +99,8 @@
* provider then the {@link SecurityManager#checkRead(String)} method
* is invoked to check read access to the file.
*
* @see java.nio.file.Files#probeContentType
*/
- public abstract String probeContentType(FileRef file)
+ public abstract String probeContentType(Path path)
throws IOException;
}