API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.web.multipart. JOTMultiPartItem View Source
Author(s)
thibautc
Since
Version
Serial
Hierarchy
 Object
      JOTMultiPartItem
Implements
Subclasses
Description
public class JOTMultiPartItem
  When a multipart request is processed, we can find one or more MultiPart items.
See also:   
Constructors
public JOTMultiPartItem (File file, int type, String name)
Methods
Hide/Show inherited methods
public void copyDataTo (OutputStream os) throws Exception
  Saves the data to a stream (ie: File) without using much memory.
public byte getDataAsBytes () throws Exception
  Returns the data as a byte array WARNING: for a file this might be a huge byte array, using lots of memory, it is best to use copyDataTo(os).
public String getDataAsString () throws Exception
  Returns the data as a string, this should be use for variables only Not for files.
protected long getDataEnd ()
  Index of file/field data end in raw multipart temp file.
protected long getDataStart ()
  Index of file/field data start in raw multipart temp file.
public String getFileName ()
  return the file name only (remove the path if the browser gave one like ie does.)
public String getFilePath ()
  For a file returns the name of the file provided by the user Note: some browsers give a full path, some others give only the file name (no path) you probably want to use getFileName() instead;
public String getName ()
protected File getRawFile ()
  Returns the RAW multipart data File handle.
protected int getType ()
protected void setDataEnd (long dataEnd)
protected void setDataStart (long dataStart)
public void setFilePath (String filePath)
  File path provided by browser for uploaded file
protected void setName (String name)
Fields
Hide/Show inherited fields
pack-private long dataEnd
pack-private long dataStart
pack-private File file
pack-private String filePath
pack-private String name
pack-private int type
publicfinalstatic int TYPE_FILE = "1"
publicfinalstatic int TYPE_VARIABLE = "2"
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar