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
It has the same function as the getName method.
See the getFieldName method of the FieldItem class.
See the getItemType method of the FieldItem class.
See the isEmpty method of the FileItem class.
Has the same functionality as the getOriginalFilenameMethod method.
See the getFilename method of the FileItem class.
See the getFilenameWithoutExtension method of the FileItem class.
See the getContentType method of the FileItem class.
See the getTempFilePath method of the FileItem class.
See the getTempFile method of the FileItem class.
Has the same functionality as the getSize method.
See the getFileSize method of the FileItem class.
See the getOriginalFileSize method of the FileItem class.
See the isEligibleFile method of the FileItem class.
See the getExtension method of the FileItem class.
See the getLastSavedFilePath method of the FileItem class.
See the getLastRelativeSavedFilePath method of the FileItem class.
See the getLastSavedFilename method of the FileItem class.
See the deleteTempFile method of the FileItem class.
See the saveAs method of the FileItem class.
See the save method of the FileItem class.
See the getFileCopyOption method of the FileItem class.
See the setFileCopyOption method of the FileItem class.
See the get method of the FileItem class.
See the isCached method of the FileItem class.
See the removeCache method of the FileItem class.
-