www.dextsolution.com
DEXTUPLOAD
NJ
menu toggleReference > devpia > dextuploadnj > support > spring > DEXTUploadNJMultipartFile

devpia.dextuploadnj.support.spring
Class DEXTUploadNJMultipartFile

Minimum version supported
1.0.0
Minimum support environment
JRE 1.6, Spring Framework
Description

It is a class that has information on uploaded temporary files and is used in the Spring Web Framework environment.

The DEXTUploadNJMultipartFile class implements the FileItem interface and the org.springframework.web.multipart.MultipartFile interface, and one object is created for each file.

Constructor

DEXTUploadNJMultipartFile

  • Create an object of the DEXTUploadNJMultipartFile class.

  • Signatures

    public DEXTUploadNJMultipartFile(FileItem item)
  • Parameters

    Name Type Description
    item devpia.dextuploadnj.FileItem the FileItem object
Methods

getName

  • Returns the field name of the multipart element.

  • Signatures

    public String getName()
  • Returns

    the field name

getOriginalFilename

  • Returns the file name.

  • Signatures

    public String getOriginalFilename()
  • Returns

    the file name

getSize

  • Returns the size of the file.

  • Signatures

    public long getSize()
  • Returns

    the size of the file

getBytes

  • Returns the contents of the file as a byte array.

  • Signatures

    public byte[] getBytes()
  • Returns

    a byte array

getInputStream

  • Returns a java.io.InputStream object so that it can read the contents of the file.

  • Signatures

    public InputStream getInputStream()
  • Returns

    a java.io.InputStream object

transferTo

  • Saves the temporary file to the specified target.

    It is a method defined in the org.springframework.web.multipart.MultipartFile interface. It is recommended to use save, saveAs method of the FileItem interface instead of this method.

    Note) If the target file already exists, executes overwrite(delete and copy).

  • Signatures

    public void transferTo(File dest)
  • Parameters

    Name Type Description
    dest java.io.File target

getFieldName

It has the same function as the getName method.

See the getFieldName method of the FieldItem class.

getItemType

See the getItemType method of the FieldItem class.

isEmpty

See the isEmpty method of the FileItem class.

getFilename

Has the same functionality as the getOriginalFilenameMethod method.

See the getFilename method of the FileItem class.

getFilenameWithoutExtension

See the getFilenameWithoutExtension method of the FileItem class.

getContentType

See the getContentType method of the FileItem class.

getTempFilePath

See the getTempFilePath method of the FileItem class.

getTempFile

See the getTempFile method of the FileItem class.

getFileSize

Has the same functionality as the getSize method.

See the getFileSize method of the FileItem class.

getOriginalFileSize

See the getOriginalFileSize method of the FileItem class.

isEligibleFile

See the isEligibleFile method of the FileItem class.

getExtension

See the getExtension method of the FileItem class.

getLastSavedFilePath

See the getLastSavedFilePath method of the FileItem class.

getLastRelativeSavedFilePath

See the getLastRelativeSavedFilePath method of the FileItem class.

getLastSavedFilename

See the getLastSavedFilename method of the FileItem class.

deleteTempFile

See the deleteTempFile method of the FileItem class.

saveAs

See the saveAs method of the FileItem class.

save

See the save method of the FileItem class.

getFileCopyOption

See the getFileCopyOption method of the FileItem class.

setFileCopyOption

See the setFileCopyOption method of the FileItem class.

get

See the get method of the FileItem class.

isCached

See the isCached method of the FileItem class.

removeCache

See the removeCache method of the FileItem class.