Class GenAttFileItem

  • All Implemented Interfaces:
    org.apache.commons.fileupload.FileItem, org.apache.commons.fileupload.FileItemHeadersSupport

    public class GenAttFileItem
    extends java.lang.Object
    implements org.apache.commons.fileupload.FileItem
    GenAttFileItem : builds a new fileItem
    • Constructor Summary

      Constructors 
      Constructor Description
      GenAttFileItem​(byte[] bValue, java.lang.String strFileName)
      Creates a new file item
      GenAttFileItem​(byte[] bValue, java.lang.String strFileName, int nIdResponse, java.lang.String strOrigin)
      Creates a new file item
      GenAttFileItem​(byte[] bValue, java.lang.String strFileName, java.lang.String strFieldName, int nIdResponse, java.lang.String strOrigin)
      Creates a new file item
    • Constructor Detail

      • GenAttFileItem

        public GenAttFileItem​(byte[] bValue,
                              java.lang.String strFileName)
        Creates a new file item
        Parameters:
        bValue - the byte value
        strFileName - the file name
      • GenAttFileItem

        public GenAttFileItem​(byte[] bValue,
                              java.lang.String strFileName,
                              int nIdResponse,
                              java.lang.String strOrigin)
        Creates a new file item
        Parameters:
        bValue - the byte value
        strFileName - the file name
        nIdResponse - The id of the response associated with this file item if any
      • GenAttFileItem

        public GenAttFileItem​(byte[] bValue,
                              java.lang.String strFileName,
                              java.lang.String strFieldName,
                              int nIdResponse,
                              java.lang.String strOrigin)
        Creates a new file item
        Parameters:
        bValue - the byte value
        strFileName - the file name
        strFieldName - The name of the HTML field associated with this file, if any
        nIdResponse - The id of the response associated with this file item if any
    • Method Detail

      • delete

        public void delete()
        Specified by:
        delete in interface org.apache.commons.fileupload.FileItem
      • get

        public byte[] get()
        Specified by:
        get in interface org.apache.commons.fileupload.FileItem
      • getContentType

        public java.lang.String getContentType()
        Specified by:
        getContentType in interface org.apache.commons.fileupload.FileItem
      • getFieldName

        public java.lang.String getFieldName()
        Specified by:
        getFieldName in interface org.apache.commons.fileupload.FileItem
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in interface org.apache.commons.fileupload.FileItem
        Throws:
        java.io.IOException
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.apache.commons.fileupload.FileItem
      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Specified by:
        getOutputStream in interface org.apache.commons.fileupload.FileItem
        Throws:
        java.io.IOException
      • getSize

        public long getSize()
        Specified by:
        getSize in interface org.apache.commons.fileupload.FileItem
      • getOrigin

        public java.lang.String getOrigin()
      • getString

        public java.lang.String getString()
        Specified by:
        getString in interface org.apache.commons.fileupload.FileItem
      • getString

        public java.lang.String getString​(java.lang.String encoding)
                                   throws java.io.UnsupportedEncodingException
        Specified by:
        getString in interface org.apache.commons.fileupload.FileItem
        Throws:
        java.io.UnsupportedEncodingException
      • getIdResponse

        public int getIdResponse()
        Get the id of the associated response, if any
        Returns:
        The id of the associated response, if any
      • isFormField

        public boolean isFormField()
        Specified by:
        isFormField in interface org.apache.commons.fileupload.FileItem
      • isInMemory

        public boolean isInMemory()
        Specified by:
        isInMemory in interface org.apache.commons.fileupload.FileItem
      • setFieldName

        public void setFieldName​(java.lang.String strName)
        Specified by:
        setFieldName in interface org.apache.commons.fileupload.FileItem
      • setFormField

        public void setFormField​(boolean bState)
        Specified by:
        setFormField in interface org.apache.commons.fileupload.FileItem
      • setIdResponse

        public void setIdResponse​(int nIdResponse)
        Set the id of the associated response, if any
        Parameters:
        nIdResponse - The id of the associated response, if any
      • setOrigin

        public void setOrigin​(java.lang.String strOrigin)
      • write

        public void write​(java.io.File file)
                   throws java.lang.Exception
        Specified by:
        write in interface org.apache.commons.fileupload.FileItem
        Throws:
        java.lang.Exception
      • getHeaders

        public org.apache.commons.fileupload.FileItemHeaders getHeaders()
        Specified by:
        getHeaders in interface org.apache.commons.fileupload.FileItemHeadersSupport
      • setHeaders

        public void setHeaders​(org.apache.commons.fileupload.FileItemHeaders headers)
        Specified by:
        setHeaders in interface org.apache.commons.fileupload.FileItemHeadersSupport