com.atlassian.plugins.rest.common.multipart.fileupload
Class CommonsFileUploadFilePart

java.lang.Object
  extended by com.atlassian.plugins.rest.common.multipart.fileupload.CommonsFileUploadFilePart
All Implemented Interfaces:
FilePart

public final class CommonsFileUploadFilePart
extends java.lang.Object
implements FilePart


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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Description copied from interface: FilePart
Get the file name of the part

Specified by:
getName in interface FilePart
Returns:
The file name of the part

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: FilePart
Get the input stream of the part

Specified by:
getInputStream in interface FilePart
Returns:
The input stream
Throws:
java.io.IOException - If an error occured

getContentType

public java.lang.String getContentType()
Description copied from interface: FilePart
Get the content type of the part

Specified by:
getContentType in interface FilePart
Returns:
The content type of the part

write

public void write(java.io.File file)
           throws java.io.IOException
Description copied from interface: FilePart
Write the part to the given file

Specified by:
write in interface FilePart
Parameters:
file - The file to write the part to
Throws:
java.io.IOException

getValue

public java.lang.String getValue()
Description copied from interface: FilePart
Get the simple value of the part

Specified by:
getValue in interface FilePart
Returns:
The value

isFormField

public boolean isFormField()
Description copied from interface: FilePart
Whether the part is a simple form field

Specified by:
isFormField in interface FilePart
Returns:
True if it's a simple form field


Copyright © 2014 Atlassian. All Rights Reserved.