Class SortFileExtensions


  • public final class SortFileExtensions
    extends java.lang.Object
    The class SortFileExtensions provides algorithms for sort file content.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void sort​(java.io.File file, java.util.Comparator<java.lang.String> comparator, java.lang.String encoding)
      Sort the file content from the given File.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sort

        public static void sort​(java.io.File file,
                                java.util.Comparator<java.lang.String> comparator,
                                java.lang.String encoding)
                         throws java.io.FileNotFoundException,
                                java.io.IOException
        Sort the file content from the given File.
        Parameters:
        file - the file
        comparator - the comparator
        encoding - the encoding
        Throws:
        java.io.FileNotFoundException - is thrown if the given file is not found.
        java.io.IOException - Signals that an I/O exception has occurred.