You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/12/16 21:27:44 UTC

[commons-vfs] branch master updated: Sort methods.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new c2644dd  Sort methods.
c2644dd is described below

commit c2644dde3485e906566c6d27ff828a776937b993
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Dec 16 16:27:39 2020 -0500

    Sort methods.
---
 .../apache/commons/vfs2/util/FileObjectUtils.java  | 30 +++++++++++-----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
index 3fc7be1..9ab8f28 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
@@ -175,21 +175,6 @@ public final class FileObjectUtils {
     }
 
     /**
-     * Writes the content of a file to an OutputStream.
-     *
-     * @param file The FileObject to write.
-     * @param output The OutputStream to write to.
-     * @throws IOException if an error occurs writing the file.
-     * @see FileContent#write(OutputStream)
-     * @since 2.6.0
-     */
-    public static void writeContent(final FileObject file, final OutputStream output) throws IOException {
-        try (final FileContent content = file.getContent()) {
-            content.write(output);
-        }
-    }
-
-    /**
      * Writes the content from a source file to a destination file.
      *
      * @param srcFile The source FileObject.
@@ -204,6 +189,21 @@ public final class FileObjectUtils {
         }
     }
 
+    /**
+     * Writes the content of a file to an OutputStream.
+     *
+     * @param file The FileObject to write.
+     * @param output The OutputStream to write to.
+     * @throws IOException if an error occurs writing the file.
+     * @see FileContent#write(OutputStream)
+     * @since 2.6.0
+     */
+    public static void writeContent(final FileObject file, final OutputStream output) throws IOException {
+        try (final FileContent content = file.getContent()) {
+            content.write(output);
+        }
+    }
+
     private FileObjectUtils() {
         // noop
     }