public interface

PostedFile

com.microstrategy.web.platform.PostedFile
Known Indirect Subclasses

Class Overview

The PostedFile interface represents an uploaded file from the client side. Usually uploading a file requires to send a MultipartRequest to the Web server.

Summary

Public Methods
abstract InputStream getInputStream()
Gets a Stream object which points to an uploaded file to prepare for reading the contents of the file.
abstract long getLength()
Returns the size in bytes of an uploaded file.
abstract String getName()
Returns the fully-qualified name of the file on the client's computer (for example "C:\MyFiles\Test.txt").
abstract String getType()
Returns the MIME content type of a file sent by a client.
abstract void release()
Releases any resources held by this After calling release this object is not valid anymore.

Public Methods

public abstract InputStream getInputStream ()

Gets a Stream object which points to an uploaded file to prepare for reading the contents of the file.

Returns
  • a Stream object
Throws
IOException thrown if the InputStream can not be obtained.

public abstract long getLength ()

Returns the size in bytes of an uploaded file.

Returns
  • the size in bytes of an uploaded file.

public abstract String getName ()

Returns the fully-qualified name of the file on the client's computer (for example "C:\MyFiles\Test.txt").

Returns
  • the fully-qualified name of the file on the client's computer

public abstract String getType ()

Returns the MIME content type of a file sent by a client.

Returns
  • the MIME content type of a file sent by a client.

public abstract void release ()

Releases any resources held by this After calling release this object is not valid anymore.

Throws
IOException if an error occurs while closing any opened streams or deleting the temporary file