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()
use org.apache.commons.io.FileUtils.copyDirectory()
use org.apache.commons.io.FileUtils.copyDirectory()
use org.apache.commons.io.FileUtils.copyDirectory()
use java.nio.Files.copy(source.toPath(), destination.toPath(), LinkOption.NOFOLLOW_LINKS,
StandardCopyOption.REPLACE_EXISTING)
use org.apache.commons.io.FileUtils.copyFileToDirectory()
use java.nio.Files.copy(source.openStream(), destination.toPath(),
StandardCopyOption.REPLACE_EXISTING)
use java.nio.Files.createTempFile()
use java.nio.files.Files.delete(file.toPath())
use org.apache.commons.io.FileUtils.deleteDirectory()
use org.apache.commons.io.FileUtils.deleteDirectory()
use java.nio.files.Files.delete(file.toPath())
use Paths.get(path).getParent().getName()
use org.apache.commons.io.FilenameUtils.getExtension
use java.nio.files.Files.write(filename, data.getBytes(),
StandardOpenOption.APPEND, StandardOpenOption.CREATE)
use java.nio.files.Files.write(filename, data.getBytes(encoding),
StandardOpenOption.APPEND, StandardOpenOption.CREATE)
use Files.delete(Paths.get(fileName))
use java.io.File.exists()
use Paths.get(path).getName()
use new String(java.nio.files.Files.readAllBytes(file.toPath()))
use new String(java.nio.files.Files.readAllBytes(file.toPath()), encoding)
use new String(java.nio.files.Files.readAllBytes(file))
use java.nio.files.Files.readAllLines()
use java.nio.files.Files.write(file.toPath(),
data.getBytes(encoding), StandardOpenOption.CREATE)
use java.nio.files.Files.write(filename,
data.getBytes(), StandardOpenOption.CREATE)
use java.nio.files.Files.write(Paths.get(filename),
data.getBytes(encoding), StandardOpenOption.CREATE)
use java.nio.files.Files.write(file.toPath(),
data.getBytes(encoding), StandardOpenOption.CREATE)
use java.nio.files.Files.write(file.toPath(),
data.getBytes(encoding), StandardOpenOption.CREATE)
use org.apache.commons.io.FileUtils.deleteQuietly()
use org.apache.commons.io.FileUtils.deleteQuietly()
use org.apache.commons.io.FilenameUtils.getExtension()
use java.nio.file.Files.isSymbolicLink(file.toPath())
use java.nio.file.Files.isSymbolicLink(file.toPath())
assumes the platform default character set
use java.nio.file.Files.createDirectories(Paths.get(dir))
use org.apache.commons.io.FileNameUtils.normalize()
use org.apache.commons.io.FilenameUtils.removeExtension()
use java.nio.Files.move()
use org.apache.commons.io.FileUtils.sizeOf()
use org.apache.commons.io.FileUtils.sizeOf()
use org.apache.commons.io.IOUtils.contentEquals()
always specify a character encoding
always specify a character encoding
use org.apache.commons.io.IOUtils.write()
.
use org.apache.commons.io.IOUtils.write()
.
use org.apache.commons.io.IOUtils.copy()
or in
Java 9 and later InputStream.transferTo()
.
use org.apache.commons.io.IOUtils.copy()
or in
Java 9 and later InputStream.transferTo()
.
use org.apache.commons.io.IOUtils.copy()
.
use org.apache.commons.io.IOUtils.copy()
.
use org.apache.commons.io.IOUtils.copy()
.
use org.apache.commons.io.IOUtils.copy()
.
always specify a character encoding
always specify a character encoding
use org.apache.commons.io.IOUtils.copy()
.
always specify a character encoding
always specify a character encoding
use org.apache.commons.io.IOUtils.write()
.
use org.apache.commons.io.IOUtils.readFully()
.
use org.apache.commons.io.IOUtils.readFully()
.
always specify a character encoding
always specify a character encoding
always specify a character encoding
always specify a character encoding
always specify a character encoding
always specify a character encoding
use new String(input, encoding)
use new String(input, encoding)
always specify a character encoding
always specify a character encoding
use org.apache.commons.io.IOUtils.toString()
.
use org.apache.commons.io.IOUtils.toString()
.
use org.apache.commons.io.IOUtils.toString()
.
use org.apache.commons.io.IOUtils.toString()
.
always specify an encoding. Do not depend on the default platform character set.
use org.apache.commons.io.input.XmlStreamReader instead
use org.apache.commons.io.input.XmlStreamReader instead
use org.apache.commons.io.input.XmlStreamReader
instead
use java.lang.Objects.toString()
use java.lang.Objects.toString()
use java.lang.Objects.equals()
use java.lang.String.join(
) instead
use java.lang.String.join(
) instead
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, change
Stringutils.unifyLineSeparators(s)
to simply s
.
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.
use org.apache.commons.io.input.XmlStreamWriter instead
use org.apache.commons.io.input.XmlStreamWriter instead
use str == null || str.trim().isEmpty()
use str != null && !str.isEmpty()
use {#build(java.io.Reader)}
use str == null || String.isBlank(str)
(Java 11+)
or org.apache.commons.lang3.StringUtils.isBlank(str)