Class TypedFile

    • Constructor Detail

      • TypedFile

        public TypedFile​(Path file,
                         String contentType)
        Creates a new typed file with the specified data and content type.
        Parameters:
        file - The file with the data.
        contentType - The content type. Defaults to "application/octet-stream" if blank.
      • TypedFile

        public TypedFile​(File file,
                         String contentType)
        Creates a new typed file with the specified data and content type.
        Parameters:
        file - The file with the data.
        contentType - The content type. Defaults to "application/octet-stream" if blank.
    • Method Detail

      • contentType

        public String contentType()
        Gets the content type of the file.
        Returns:
        The content type.
      • file

        public File file()
        Gets the file with the data
        Returns:
        The file with the data.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object