Package org.apache.struts2.dispatcher.multipart

# Class StrutsUploadedFile

java.lang.Object
org.apache.struts2.dispatcher.multipart.StrutsUploadedFile

All Implemented Interfaces:
  `Serializable`, `UploadedFile`

public class StrutsUploadedFile extends Object implements UploadedFile

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `StrutsUploadedFile.Builder`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `delete()`
  `String`
  `getAbsolutePath()`
  `File`
  `getContent()`
  `String`
  `getContentType()`
  `String`
  `getInputName()`
  Represents a name of the input file, eg.: "myFile" in case of
  `String`
  `getName()`
  `String`
  `getOriginalName()`
  `boolean`
  `isFile()`
  `Long`
  `length()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### length

    public Long length()
    Specified by:
      `length` in interface `UploadedFile`
    Returns:
      size of the content of file/stream/array

  - ### getName

    public String getName()
    Specified by:
      `getName` in interface `UploadedFile`
    Returns:
      a local name of the file

  - ### isFile

    public boolean isFile()
    Specified by:
      `isFile` in interface `UploadedFile`
    Returns:
      indicates if this is a real file or maybe just in-memory stream

  - ### delete

    public boolean delete()
    Specified by:
      `delete` in interface `UploadedFile`
    Returns:
      removes a local copy of the uploaded file/stream

  - ### getAbsolutePath

    public String getAbsolutePath()
    Specified by:
      `getAbsolutePath` in interface `UploadedFile`
    Returns:
      an absolute path of the file if possible

  - ### getContent

    public File getContent()
    Specified by:
      `getContent` in interface `UploadedFile`
    Returns:
      content of the upload file

  - ### getContentType

    public String getContentType()
    Specified by:
      `getContentType` in interface `UploadedFile`
    Returns:
      content type of the uploaded file

  - ### getOriginalName

    public String getOriginalName()
    Specified by:
      `getOriginalName` in interface `UploadedFile`
    Returns:
      original file name from upload source

  - ### getInputName

    public String getInputName()
    Description copied from interface: `UploadedFile`
    Represents a name of the input file, eg.: "myFile" in case of
    Specified by:
      `getInputName` in interface `UploadedFile`
    Returns:
      name of the input file field

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`