com.isomorphic.servlet

## Class ISCFileItem

- java.lang.Object
- - com.isomorphic.servlet.ISCFileItem

- All Implemented Interfaces:
    org.apache.commons.fileupload2.core.FileItem, org.apache.commons.fileupload2.core.FileItemHeadersProvider

      public class ISCFileItem
      extends java.lang.Object
      implements org.apache.commons.fileupload2.core.FileItem

  This class is based on the Apache Commons FileUpload FileItem class, providing uploaded file APIs for the SmartClient Server.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `get()`
    `java.lang.String` | `getFileName()`
    `java.io.InputStream` | `getInputStream()` This method always returns the InputStream associated with the originally uploaded file.
    `long` | `getSize()`

- - ### Method Detail

    - #### get

          public byte[] get()

      Returns:
        bytes of the uploaded file

    - #### getInputStream

          public java.io.InputStream getInputStream()

      This method always returns the InputStream associated with the originally uploaded file. This is not necessarily the same object as that returned by DSRequest.getUploadedFileStream(), because that method can be influenced by user code setting the value of a field in the values map to a different InputStream. Eg, if the request contains an uploaded file for a field called "myField", user code in a DMI or custom DataSource could do something like this to override the stream processed by the server:

      `InputStream newStream = someFunctionThatReturnsAnInputStream(); dsRequest.getValues().put("myField", newStream); ```

      Returns:
        uploaded file an InputStream
      See Also:
        `DSRequest.getUploadedFileStream(java.lang.String)`

    - #### getSize

          public long getSize()

      Returns:
        size of the uploaded file in bytes

    - #### getFileName

          public java.lang.String getFileName()

      Returns:
        filename as it appears in the upload field on the client (typically includes full path to file on the user's machine)