org.glassfish.jersey.media.multipart
Class FormDataContentDisposition

java.lang.Object
  extended by org.glassfish.jersey.media.multipart.ContentDisposition
      extended by org.glassfish.jersey.media.multipart.FormDataContentDisposition

public class FormDataContentDisposition
extends ContentDisposition

A form-data content disposition header.

Author:
Paul Sandoz, imran@smartitengineering.com, Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
static class FormDataContentDisposition.FormDataContentDispositionBuilder
          Builder to build form data content disposition.
 
Nested classes/interfaces inherited from class org.glassfish.jersey.media.multipart.ContentDisposition
ContentDisposition.ContentDispositionBuilder<T extends ContentDisposition.ContentDispositionBuilder,V extends ContentDisposition>
 
Constructor Summary
  FormDataContentDisposition(HttpHeaderReader reader, boolean fileNameFix)
           
  FormDataContentDisposition(String header)
           
  FormDataContentDisposition(String header, boolean fileNameFix)
           
protected FormDataContentDisposition(String type, String name, String fileName, Date creationDate, Date modificationDate, Date readDate, long size)
          Constructor for the builder.
 
Method Summary
 String getName()
          Get the name parameter.
static FormDataContentDisposition.FormDataContentDispositionBuilder name(String name)
          Start building a form data content disposition.
protected  StringBuilder toStringBuffer()
           
 
Methods inherited from class org.glassfish.jersey.media.multipart.ContentDisposition
addDateParameter, addLongParameter, addStringParameter, getCreationDate, getFileName, getModificationDate, getParameters, getReadDate, getSize, getType, toString, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormDataContentDisposition

protected FormDataContentDisposition(String type,
                                     String name,
                                     String fileName,
                                     Date creationDate,
                                     Date modificationDate,
                                     Date readDate,
                                     long size)
Constructor for the builder.

Parameters:
type - the disposition type. will be "form-data".
name - the control name.
fileName - the file name.
creationDate - the creation date.
modificationDate - the modification date.
readDate - the read date.
size - the size.
Throws:
IllegalArgumentException - if the type is not equal to "form-data" or the name is null

FormDataContentDisposition

public FormDataContentDisposition(String header)
                           throws ParseException
Throws:
ParseException

FormDataContentDisposition

public FormDataContentDisposition(String header,
                                  boolean fileNameFix)
                           throws ParseException
Throws:
ParseException

FormDataContentDisposition

public FormDataContentDisposition(HttpHeaderReader reader,
                                  boolean fileNameFix)
                           throws ParseException
Throws:
ParseException
Method Detail

getName

public String getName()
Get the name parameter.

Returns:
the name

toStringBuffer

protected StringBuilder toStringBuffer()
Overrides:
toStringBuffer in class ContentDisposition

name

public static FormDataContentDisposition.FormDataContentDispositionBuilder name(String name)
Start building a form data content disposition.

Parameters:
name - the control name.
Returns:
the form data content disposition builder.


Copyright © 2007-2013 Oracle Corporation. All Rights Reserved. Use is subject to license terms.