Class FileContent

java.lang.Object
com.technia.tif.enovia.integration.FileContent

@API public class FileContent extends Object
Represents a file content: file name and input stream providing the content.
Since:
2021.2.0
  • Constructor Details

  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Throws:
      IOException
    • getFileName

      public String getFileName()
    • fromFile

      public static FileContent fromFile(File file)
      Creates file content based on a File.
      Parameters:
      file - File
      Returns:
      FileContentProviderResult
    • fromURL

      public static FileContent fromURL(URL url)
      Creates file content based on a URL. NOTE: Detects the file name from URL path.
      Parameters:
      url - URL to file
      Returns:
      FileContentProviderResult
    • fromURL

      public static FileContent fromURL(URL url, String fileName)
      Creates file content based on a URL and file name.
      Parameters:
      url - URL to file
      fileName - The name of the file
      Returns:
      FileContentProviderResult