Java 8: Deprecate some methods in IOUtils
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808475 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e9876165d3
commit
f947ab760d
@ -207,7 +207,10 @@ public final class IOUtils {
|
||||
* @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
|
||||
public static void write(POIDocument doc, OutputStream out) throws IOException {
|
||||
try {
|
||||
doc.write(out);
|
||||
@ -226,7 +229,10 @@ public final class IOUtils {
|
||||
* @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
|
||||
public static void write(Workbook doc, OutputStream out) throws IOException {
|
||||
try {
|
||||
doc.write(out);
|
||||
@ -246,7 +252,10 @@ public final class IOUtils {
|
||||
* @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
|
||||
public static void writeAndClose(POIDocument doc, OutputStream out) throws IOException {
|
||||
try {
|
||||
write(doc, out);
|
||||
@ -265,7 +274,10 @@ public final class IOUtils {
|
||||
* @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
|
||||
public static void writeAndClose(POIDocument doc, File out) throws IOException {
|
||||
try {
|
||||
doc.write(out);
|
||||
@ -283,7 +295,10 @@ public final class IOUtils {
|
||||
*
|
||||
* @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
|
||||
public static void writeAndClose(POIDocument doc) throws IOException {
|
||||
try {
|
||||
doc.write();
|
||||
@ -294,6 +309,11 @@ public final class IOUtils {
|
||||
|
||||
// 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
|
||||
public static void writeAndClose(Workbook doc, OutputStream out) throws IOException {
|
||||
try {
|
||||
doc.write(out);
|
||||
|
Loading…
Reference in New Issue
Block a user