Class FileSizesUtil

java.lang.Object
gov.nasa.pds.tools.util.FileSizesUtil

public class FileSizesUtil
extends Object
A class that calculates the filesize of a file in bytes.
  • Constructor Details

    • FileSizesUtil

      public FileSizesUtil()
  • Method Details

    • getExternalFilesize

      public static int getExternalFilesize​(URL url) throws Exception
      Gets the filesize value.
      Parameters:
      url - The url to the file or resource.
      Returns:
      The filesize of the given filename.
      Throws:
      Exception - If an error occurred while calculating the checksum.