Class RsFileUtils

FileUtils
net.datenwerke.rs.utils.file.RsFileUtils

public class RsFileUtils extends FileUtils
Custom Implementation of FileUtils.byteCountToDisplaySize to fix rounding bug https://issues.apache.org/jira/browse/IO-373
  • Constructor Details

    • RsFileUtils

      public RsFileUtils()
  • Method Details

    • byteCountToDisplaySize

      public static String byteCountToDisplaySize(BigInteger fileSize)
      Formats a file's size into a human readable format
      Parameters:
      fileSize - the file's size as BigInteger
      Returns:
      the size as human readable string
    • byteCountToDisplaySize

      public static String byteCountToDisplaySize(long fileSize)
      Formats a file's size into a human readable format
      Parameters:
      fileSize - the file's size as long
      Returns:
      the size as human readable string
    • appendFileCheck

      public static String appendFileCheck(Path path)
    • checkReadable

      public static boolean checkReadable(Path path)
    • checkWritable

      public static boolean checkWritable(Path path)
    • getContentType

      public static String getContentType(BinaryFormat format)
    • getContentType

      public static String getContentType(TextFormat format)