Class TextUploadedFile

  • All Implemented Interfaces:
    org.primefaces.model.file.UploadedFile

    public final class TextUploadedFile
    extends Object
    implements org.primefaces.model.file.UploadedFile
    A UploadedFile with data from a text string.
    Since:
    8.2.0
    Author:
    XIMA Media GmbH
    • Constructor Detail

      • TextUploadedFile

        public TextUploadedFile​(String fileName,
                                String textContent,
                                Charset encoding,
                                String contentType,
                                long size)
    • Method Detail

      • delete

        public void delete()
        Specified by:
        delete in interface org.primefaces.model.file.UploadedFile
      • getContent

        public byte[] getContent()
        Specified by:
        getContent in interface org.primefaces.model.file.UploadedFile
      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface org.primefaces.model.file.UploadedFile
      • getFileName

        public String getFileName()
        Specified by:
        getFileName in interface org.primefaces.model.file.UploadedFile
      • getInputStream

        public InputStream getInputStream()
                                   throws IOException
        Specified by:
        getInputStream in interface org.primefaces.model.file.UploadedFile
        Throws:
        IOException
      • getSize

        public long getSize()
        Specified by:
        getSize in interface org.primefaces.model.file.UploadedFile
      • write

        public void write​(String filePath)
                   throws Exception
        Specified by:
        write in interface org.primefaces.model.file.UploadedFile
        Throws:
        Exception