-
ClassDescriptionUse IOUtils. Will be removed in 3.0. Methods renamed to IOUtils.write() or IOUtils.copy(). Null handling behavior changed in IOUtils (null data does not throw NullPointerException).Apache Commons IO no longer uses this class. Instead, use
PathUtils.walk(java.nio.file.Path, org.apache.commons.io.file.PathFilter, int, boolean, java.nio.file.FileVisitOption...)
orFiles.walkFileTree(java.nio.file.Path, java.util.Set, int, java.nio.file.FileVisitor)
, and friends.Use WildcardFileFilter. Deprecated as this class performs directory filtering which it shouldn't do, but that can't be removed due to compatibility.As of 2.6 deprecated without replacement. Use equivalent methods inFileStore
instead,Files.getFileStore(Paths.get("/home")).getUsableSpace()
or iterate overFileSystems.getDefault().getFileStores()
UseBoundedInputStream
(unbounded by default).
-
FieldDescriptionUse Java 7's
StandardCharsets
Use Java 7'sStandardCharsets
Use Java 7'sStandardCharsets
Use Java 7'sStandardCharsets
Use Java 7'sStandardCharsets
Use Java 7'sStandardCharsets
Not reusable without callingNullInputStream.init()
to reset state.UseNullWriter.INSTANCE
.
-
MethodDescriptionUse
CopyUtils.copy(byte[], Writer, String)
insteadUseCopyUtils.copy(InputStream, Writer, String)
insteadUseCopyUtils.copy(Reader, OutputStream, String)
insteadUseCopyUtils.copy(String, OutputStream, String)
insteadUse freeSpaceKb(String) Deprecated from 1.3, may be removed in 2.0As of 2.6 deprecated without replacement. Please useFileStore.getUsableSpace()
.As of 2.6 deprecated without replacement. Please useFileStore.getUsableSpace()
.As of 2.6 deprecated without replacement. Please useFileStore.getUsableSpace()
.As of 2.6 deprecated without replacement. Please useFileStore.getUsableSpace()
.UseFileUtils.readFileToString(File, Charset)
instead (and specify the appropriate encoding)UseFileUtils.readLines(File, Charset)
instead (and specify the appropriate encoding)UseFileUtils.write(File, CharSequence, Charset)
instead (and specify the appropriate encoding)UseFileUtils.write(File, CharSequence, Charset, boolean)
instead (and specify the appropriate encoding)UseFileUtils.writeStringToFile(File, String, Charset)
instead (and specify the appropriate encoding)UseFileUtils.writeStringToFile(File, String, Charset, boolean)
instead (and specify the appropriate encoding)UseBoundedInputStream.AbstractBuilder.setPropagateClose(boolean)
.UseTailer.close()
.UseIOUtils.copy(InputStream, Writer, Charset)
insteadUseIOUtils.copy(Reader, OutputStream, Charset)
insteadUseIOUtils.readLines(InputStream, Charset)
insteadUseIOUtils.toByteArray(Reader, Charset)
insteadUseString.getBytes()
insteadUseIOUtils.toCharArray(InputStream, Charset)
insteadUseIOUtils.toInputStream(CharSequence, Charset)
insteadUseIOUtils.toInputStream(String, Charset)
insteadUseString(byte[])
insteadUseIOUtils.toString(InputStream, Charset)
insteadUseIOUtils.toString(URI, Charset)
insteadUseIOUtils.toString(URL, Charset)
insteadUseIOUtils.write(byte[], Writer, Charset)
insteadUseIOUtils.write(char[], OutputStream, Charset)
insteadUseIOUtils.write(String, OutputStream, Charset)
insteadAs of 2.6 deprecated without replacement. Please use the try-with-resources statement or handle suppressed exceptions manually.UseLineIterator.next()
.UseAbstractByteArrayOutputStream.toString(String)
instead
-
ConstructorDescriptionTODO Make private in 3.0.TODO Make private in 3.0.TODO Make private in 3.0.TODO Make private in 3.0.TODO Make private in 3.0.Use
IOSupplier.get()
.UseIOSupplier.get()
.Using this constructor prevents IDEs from warning if the underlying input stream is never closed. UseCloseShieldInputStream.wrap(InputStream)
instead.Using this constructor prevents IDEs from warning if the underlying reader is never closed. UseCloseShieldReader.wrap(Reader)
instead.UseReaderInputStream.builder()
insteadUseReaderInputStream.builder()
insteadUseReaderInputStream.builder()
insteadUseReaderInputStream.builder()
instead, will be protected for subclasses.UseReaderInputStream.builder()
insteadUseReaderInputStream.builder()
insteadUseReaderInputStream.builder()
insteadTODO Make private in 3.0.Using this constructor prevents IDEs from warning if the underlying output stream is never closed. UseCloseShieldOutputStream.wrap(OutputStream)
instead.Using this constructor prevents IDEs from warning if the underlying writer is never closed. UseCloseShieldWriter.wrap(Writer)
instead.UseNullWriter.INSTANCE
.UseUnsynchronizedByteArrayOutputStream.builder()
,UnsynchronizedByteArrayOutputStream.Builder
, andUnsynchronizedByteArrayOutputStream.Builder.get()
. Will be private in 3.0.0.TODO Make private in 3.0.TODO Make private in 3.0.