com.atlassian.plugins.rest.common.multipart
Interface FilePart

All Known Implementing Classes:
CommonsFileUploadFilePart

public interface FilePart

A part of a multi part request


Method Summary
 java.lang.String getContentType()
          Get the content type of the part
 java.io.InputStream getInputStream()
          Get the input stream of the part
 java.lang.String getName()
          Get the file name of the part
 java.lang.String getValue()
          Get the simple value of the part
 boolean isFormField()
          Whether the part is a simple form field
 void write(java.io.File file)
          Write the part to the given file
 

Method Detail

getName

java.lang.String getName()
Get the file name of the part

Returns:
The file name of the part

getContentType

java.lang.String getContentType()
Get the content type of the part

Returns:
The content type of the part
Since:
2.4

write

void write(java.io.File file)
           throws java.io.IOException
Write the part to the given file

Parameters:
file - The file to write the part to
Throws:
java.io.IOException
Since:
2.4

getInputStream

java.io.InputStream getInputStream()
                                   throws java.io.IOException
Get the input stream of the part

Returns:
The input stream
Throws:
java.io.IOException - If an error occured

getValue

java.lang.String getValue()
Get the simple value of the part

Returns:
The value
Since:
2.4

isFormField

boolean isFormField()
Whether the part is a simple form field

Returns:
True if it's a simple form field
Since:
2.4


Copyright © 2014 Atlassian. All Rights Reserved.