Bug Fix Open Empty Files

This commit is contained in:
Konloch 2021-07-27 04:00:53 -07:00
parent 7d252fd5bc
commit 4c2e72e78e

View file

@ -163,6 +163,9 @@ public class MiscUtils
public static String getFileHeaderMagicNumber(byte[] fileContents)
{
if(fileContents == null || fileContents.length < 4)
return StringUtils.EMPTY;
return String.format("%02X%02X%02X%02X", fileContents[0],
fileContents[1], fileContents[2],fileContents[3]);
}