aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/util/IOUtils.java
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-12-09 17:35:29 +0000
committerPJ Fanning <fanningpj@apache.org>2020-12-09 17:35:29 +0000
commit78596d7891bfb8a524fe9991c2ab3b3e6d66a2ad (patch)
tree28d7025b041d85117eca207231f60c557cffbe56 /src/java/org/apache/poi/util/IOUtils.java
parentc1f5d62c35593024c9cd2f6b66d32b023170dbe9 (diff)
downloadpoi-78596d7891bfb8a524fe9991c2ab3b3e6d66a2ad.tar.gz
poi-78596d7891bfb8a524fe9991c2ab3b3e6d66a2ad.zip
remove more deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884262 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/util/IOUtils.java')
-rw-r--r--src/java/org/apache/poi/util/IOUtils.java134
1 files changed, 0 insertions, 134 deletions
diff --git a/src/java/org/apache/poi/util/IOUtils.java b/src/java/org/apache/poi/util/IOUtils.java
index 68f5bbddc5..fc75f4f652 100644
--- a/src/java/org/apache/poi/util/IOUtils.java
+++ b/src/java/org/apache/poi/util/IOUtils.java
@@ -33,9 +33,6 @@ import java.util.zip.CRC32;
import java.util.zip.Checksum;
import org.apache.poi.EmptyFileException;
-import org.apache.poi.POIDocument;
-import org.apache.poi.ss.usermodel.Workbook;
-
@Internal
public final class IOUtils {
@@ -291,137 +288,6 @@ public final class IOUtils {
}
/**
- * Write a POI Document ({@link org.apache.poi.ss.usermodel.Workbook}, {@link org.apache.poi.sl.usermodel.SlideShow}, etc) to an output stream and close the output stream.
- * This will attempt to close the output stream at the end even if there was a problem writing the document to the stream.
- *
- * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
- * This function exists for Java 6 code.
- *
- * @param doc a writeable document to write to the output stream
- * @param out the output stream that the document is written to
- * @throws IOException thrown on errors writing to the stream
- *
- * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
- */
- @Deprecated
- @Removal(version="4.2")
- public static void write(POIDocument doc, OutputStream out) throws IOException {
- try {
- doc.write(out);
- } finally {
- closeQuietly(out);
- }
- }
-
- /**
- * Write a ({@link org.apache.poi.ss.usermodel.Workbook}) to an output stream and close the output stream.
- * This will attempt to close the output stream at the end even if there was a problem writing the document to the stream.
- *
- * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
- * This function exists for Java 6 code.
- *
- * @param doc a writeable document to write to the output stream
- * @param out the output stream that the document is written to
- * @throws IOException thrown on errors writing to the stream
- *
- * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
- */
- @Deprecated
- @Removal(version="4.2")
- public static void write(Workbook doc, OutputStream out) throws IOException {
- try {
- doc.write(out);
- } finally {
- closeQuietly(out);
- }
- }
-
- /**
- * Write a POI Document ({@link org.apache.poi.ss.usermodel.Workbook}, {@link org.apache.poi.sl.usermodel.SlideShow}, etc) to an output stream and close the output stream.
- * This will attempt to close the output stream at the end even if there was a problem writing the document to the stream.
- * This will also attempt to close the document, even if an error occurred while writing the document or closing the output stream.
- *
- * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
- * This function exists for Java 6 code.
- *
- * @param doc a writeable and closeable document to write to the output stream, then close
- * @param out the output stream that the document is written to
- * @throws IOException thrown on errors writing to the stream
- *
- * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
- */
- @Deprecated
- @Removal(version="4.2")
- public static void writeAndClose(POIDocument doc, OutputStream out) throws IOException {
- try {
- write(doc, out);
- } finally {
- closeQuietly(doc);
- }
- }
-
- /**
- * Like {@link #writeAndClose(POIDocument, OutputStream)}, but for writing to a File instead of an OutputStream.
- * This will attempt to close the document, even if an error occurred while writing the document.
- *
- * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
- * This function exists for Java 6 code.
- *
- * @param doc a writeable and closeable document to write to the output file, then close
- * @param out the output file that the document is written to
- * @throws IOException thrown on errors writing to the stream
- *
- * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
- */
- @Deprecated
- @Removal(version="4.2")
- public static void writeAndClose(POIDocument doc, File out) throws IOException {
- try {
- doc.write(out);
- } finally {
- closeQuietly(doc);
- }
- }
-
- /**
- * Like {@link #writeAndClose(POIDocument, File)}, but for writing a POI Document in place (to the same file that it was opened from).
- * This will attempt to close the document, even if an error occurred while writing the document.
- *
- * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
- * This function exists for Java 6 code.
- *
- * @param doc a writeable document to write in-place
- * @throws IOException thrown on errors writing to the file
- *
- * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
- */
- @Deprecated
- @Removal(version="4.2")
- public static void writeAndClose(POIDocument doc) throws IOException {
- try {
- doc.write();
- } finally {
- closeQuietly(doc);
- }
- }
-
- // Since the Workbook interface doesn't derive from POIDocument
- // We'll likely need one of these for each document container interface
- /**
- *
- * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
- */
- @Deprecated
- @Removal(version="4.2")
- public static void writeAndClose(Workbook doc, OutputStream out) throws IOException {
- try {
- doc.write(out);
- } finally {
- closeQuietly(doc);
- }
- }
-
- /**
* Copies all the data from the given InputStream to the OutputStream. It
* leaves both streams open, so you will still need to close them once done.
*