Package net.datenwerke.rs.utils.file
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringappendFileCheck(Path path) static StringbyteCountToDisplaySize(long fileSize) Formats a file's size into a human readable formatstatic StringbyteCountToDisplaySize(BigInteger fileSize) Formats a file's size into a human readable formatstatic booleancheckReadable(Path path) static booleancheckWritable(Path path) static StringgetContentType(BinaryFormat format) static StringgetContentType(TextFormat format)
-
Constructor Details
-
RsFileUtils
public RsFileUtils()
-
-
Method Details
-
byteCountToDisplaySize
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
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
-
checkReadable
-
checkWritable
-
getContentType
-
getContentType
-