Interface PostedFile

  • All Known Implementing Classes:
    MultipartRequest.File

    public interface PostedFile
    The PostedFile interface represents an uploaded file from the client side. Usually uploading a file requires to send a MultipartRequest to the Web server.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Summary

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

      • getName

        java.lang.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
      • getType

        java.lang.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.
      • getLength

        long getLength()
        Returns the size in bytes of an uploaded file.
        Returns:
        the size in bytes of an uploaded file.
      • getInputStream

        java.io.InputStream getInputStream()
                                    throws java.io.IOException
        Gets a Stream object which points to an uploaded file to prepare for reading the contents of the file.
        Returns:
        a Stream object
        Throws:
        java.io.IOException - thrown if the InputStream can not be obtained.
      • release

        void release()
              throws java.io.IOException
        Releases any resources held by this After calling release this object is not valid anymore.
        Throws:
        java.io.IOException - if an error occurs while closing any opened streams or deleting the temporary file