Class DownLoadedFile

java.lang.Object
org.dlese.dpc.schemedit.ndr.mets.DownLoadedFile

public class DownLoadedFile extends Object
Utility to download a URL and provide information about it, such as it's contentType, contentLength, binary content, etc

NOTE: getContent fetches binary content encoded to string for binary Files

Author:
Jonathan Ostwald
  • Constructor Details

    • DownLoadedFile

      public DownLoadedFile(URL url) throws Exception
      Constructor for the DownLoadedFile object
      Parameters:
      url - url to be downloaded
      Throws:
      Exception - if url cannot be processed
  • Method Details

    • getContent

      public String getContent()
      Gets the content attribute of the DownLoadedFile object
      Returns:
      The content value
    • getFileName

      public String getFileName()
      Gets the fileName attribute of the DownLoadedFile object
      Returns:
      The fileName value
    • getIsBinary

      public boolean getIsBinary()
      Gets the isBinary attribute of the DownLoadedFile object
      Returns:
      The isBinary value
    • getContentLength

      public int getContentLength()
      Gets the contentLength attribute of the DownLoadedFile object
      Returns:
      The contentLength value
    • getContentType

      public String getContentType()
      Gets the contentType attribute of the DownLoadedFile object
      Returns:
      The contentType value
    • main

      public static void main(String[] args) throws Exception
      NOT YET DOCUMENTED
      Parameters:
      args - NOT YET DOCUMENTED
      Throws:
      Exception - NOT YET DOCUMENTED