-
Deprecated InterfacesInterfaceDescriptionuse
java.nio.file.Files.walkFileTree()and related classes
-
Deprecated ClassesClassDescriptionWindows ME is long dead. Update to Windows 10 and use
CmdShell.usejava.nio.file.DirectoryStreamand related classesusejava.nio.file.DirectoryStreamand related classesno longer needed, prefer to useFilesmethods directly.usejava.nio.filejava.nio.file.DirectoryStream.Filter<T>and related classesusejava.nio.filejava.nio.file.DirectoryStream.Filter<T>and related classesusejava.nio.file.Files.walkFileTree()and related classesusejava.nio.file.FileVisitorand related classesuse org.apache.commons.io.input.XmlStreamReader instead
-
Deprecated FieldsFieldDescriptionuse
java.nio.charset.StandardCharset.ISO_8859_1usejava.nio.charset.StandardCharset.US_ASCIIusejava.nio.charset.StandardCharset.UTF_16usejava.nio.charset.StandardCharset.UTF_16BEusejava.nio.charset.StandardCharset.UTF_16LEusejava.nio.charset.StandardCharset.UTF_8usejava.nio.charset.StandardCharset.ISO_8859_1usejava.nio.charset.StandardCharset.US_ASCIIusejava.nio.charset.StandardCharset.UTF_16usejava.nio.charset.StandardCharset.UTF_16BEusejava.nio.charset.StandardCharset.UTF_16LEusejava.nio.charset.StandardCharset.UTF_8
-
Deprecated MethodsMethodDescriptionuse System#getenv()use System#getenv()As of 3.2.0, removed without replacement.As of 3.2.0, removed without replacement.this method is buggy. Do not depend on it.this method does not work correctly on Windows.use
org.apache.commons.io.FileUtils.cleanDirectory()useorg.apache.commons.io.FileUtils.copyDirectory()useorg.apache.commons.io.FileUtils.copyDirectory()useorg.apache.commons.io.FileUtils.copyDirectory()usejava.nio.Files.copy(source.toPath(), destination.toPath(), LinkOption.NOFOLLOW_LINKS, StandardCopyOption.REPLACE_EXISTING)useorg.apache.commons.io.FileUtils.copyFileToDirectory()usejava.nio.Files.copy(source, destination.toPath(), StandardCopyOption.REPLACE_EXISTING)usejava.nio.Files.copy(source.openStream(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING)usejava.nio.Files.createTempFile()usejava.nio.files.Files.delete(file.toPath())useorg.apache.commons.io.FileUtils.deleteDirectory()useorg.apache.commons.io.FileUtils.deleteDirectory()usejava.nio.files.Files.delete(file.toPath())usePaths.get(path).getParent().getName()useorg.apache.commons.io.FilenameUtils.getExtensionusejava.nio.files.Files.write(filename, data.getBytes(), StandardOpenOption.APPEND, StandardOpenOption.CREATE)usejava.nio.files.Files.write(filename, data.getBytes(encoding), StandardOpenOption.APPEND, StandardOpenOption.CREATE)useFiles.delete(Paths.get(fileName))usejava.io.File.exists()usePaths.get(path).getName()usenew String(java.nio.files.Files.readAllBytes(file.toPath()))usenew String(java.nio.files.Files.readAllBytes(file.toPath()), encoding)usenew String(java.nio.files.Files.readAllBytes(file))usenew String(java.nio.files.Files.readAllBytes(Paths.get(file)), encoding)usejava.nio.files.Files.readAllLines()usejava.nio.files.Files.write(file.toPath(), data.getBytes(encoding), StandardOpenOption.CREATE)usejava.nio.files.Files.write(filename, data.getBytes(), StandardOpenOption.CREATE)usejava.nio.files.Files.write(Paths.get(filename), data.getBytes(encoding), StandardOpenOption.CREATE)usejava.nio.files.Files.write(file.toPath(), data.getBytes(encoding), StandardOpenOption.CREATE)usejava.nio.files.Files.write(file.toPath(), data.getBytes(encoding), StandardOpenOption.CREATE)useorg.apache.commons.io.FileUtils.deleteQuietly()useorg.apache.commons.io.FileUtils.deleteQuietly()useorg.apache.commons.io.FilenameUtils.getExtension()usejava.nio.file.Files.isSymbolicLink(file.toPath())usejava.nio.file.Files.isSymbolicLink(file.toPath())assumes the platform default character setusejava.nio.file.Files.createDirectories(Paths.get(dir))useorg.apache.commons.io.FileNameUtils.normalize()useorg.apache.commons.io.FilenameUtils.removeExtension()usejava.nio.Files.move()useorg.apache.commons.io.FileUtils.sizeOf()useorg.apache.commons.io.FileUtils.sizeOf()use try-with-resourcesuse try-with-resourcesuse try-with-resourcesuse try-with-resourcesuse try-with-resourcesuseorg.apache.commons.io.IOUtils.contentEquals()inline this methodalways specify a character encodingalways specify a character encodinguseorg.apache.commons.io.IOUtils.write().useorg.apache.commons.io.IOUtils.write().useorg.apache.commons.io.IOUtils.copy()or in Java 9 and laterInputStream.transferTo().useorg.apache.commons.io.IOUtils.copy()or in Java 9 and laterInputStream.transferTo().useorg.apache.commons.io.IOUtils.copy().useorg.apache.commons.io.IOUtils.copy().useorg.apache.commons.io.IOUtils.copy().useorg.apache.commons.io.IOUtils.copy().always specify a character encodingalways specify a character encodinguseorg.apache.commons.io.IOUtils.copy().always specify a character encodingalways specify a character encodinguseorg.apache.commons.io.IOUtils.write().useorg.apache.commons.io.IOUtils.readFully().useorg.apache.commons.io.IOUtils.readFully().always specify a character encodingalways specify a character encodingalways specify a character encodingalways specify a character encodingalways specify a character encodingalways specify a character encodingusenew String(input, encoding)usenew String(input, encoding)always specify a character encodingalways specify a character encodinguseorg.apache.commons.io.IOUtils.toString().useorg.apache.commons.io.IOUtils.toString().useorg.apache.commons.io.IOUtils.toString().useorg.apache.commons.io.IOUtils.toString().usePropertyUtils.loadOptionalProperties(java.io.File)instead. This method should not be used as it suppresses exceptions silently when loading properties fails and returnsnullinstead of an emptyPropertiesinstance when the givenFileisnull.usePropertyUtils.loadOptionalProperties(java.io.InputStream)instead. This method should not be used as it suppresses exceptions silently when loading properties fails.usePropertyUtils.loadOptionalProperties(java.net.URL)instead. This method should not be used as it suppresses exceptions silently when loading properties fails and returnsnullinstead of an emptyPropertiesinstance when the givenURLisnull.always specify an encoding. Do not depend on the default platform character set.use org.apache.commons.io.input.XmlStreamReader insteaduse org.apache.commons.io.input.XmlStreamReader insteaduseorg.apache.commons.io.input.XmlStreamReaderinsteadusejava.lang.Objects.toString()usejava.lang.Objects.toString()usejava.lang.Objects.equals()this method produces platform dependent code and contributes to non-reproducible builds. In the context of Maven, this is almost never what's needed. Remove calls to this method and do not replace them. That is, changeStringutils.unifyLineSeparators(s)to simplys.always specify an encoding. Do not depend on the default platform character set.always specify an encoding. Do not depend on the default platform character set.
-
Deprecated ConstructorsConstructorDescriptionThis is a utility class with only static methods. Don't create instances of it.This is a utility class with only static methods. Don't create instances of it.
java.nio.file.FileVisitorand related classes