com.squareup.mimecraft
Enum Multipart.Type

java.lang.Object
  extended by java.lang.Enum<Multipart.Type>
      extended by com.squareup.mimecraft.Multipart.Type
All Implemented Interfaces:
Serializable, Comparable<Multipart.Type>
Enclosing class:
Multipart

public static enum Multipart.Type
extends Enum<Multipart.Type>

Multipart MIME types.


Enum Constant Summary
ALTERNATIVE
          The "multipart/alternative" type is syntactically identical to "multipart/mixed", but the semantics are different.
DIGEST
          This type is syntactically identical to "multipart/mixed", but the semantics are different.
FORM
          The media-type multipart/form-data follows the rules of all multipart MIME data streams as outlined in RFC 2046.
MIXED
          The "mixed" subtype of "multipart" is intended for use when the body parts are independent and need to be bundled in a particular order.
PARALLEL
          This type is syntactically identical to "multipart/mixed", but the semantics are different.
 
Method Summary
static Multipart.Type valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Multipart.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MIXED

public static final Multipart.Type MIXED
The "mixed" subtype of "multipart" is intended for use when the body parts are independent and need to be bundled in a particular order. Any "multipart" subtypes that an implementation does not recognize must be treated as being of subtype "mixed".


ALTERNATIVE

public static final Multipart.Type ALTERNATIVE
The "multipart/alternative" type is syntactically identical to "multipart/mixed", but the semantics are different. In particular, each of the body parts is an "alternative" version of the same information.


DIGEST

public static final Multipart.Type DIGEST
This type is syntactically identical to "multipart/mixed", but the semantics are different. In particular, in a digest, the default Content-Type value for a body part is changed from "text/plain" to "message/rfc822".


PARALLEL

public static final Multipart.Type PARALLEL
This type is syntactically identical to "multipart/mixed", but the semantics are different. In particular, in a parallel entity, the order of body parts is not significant.


FORM

public static final Multipart.Type FORM
The media-type multipart/form-data follows the rules of all multipart MIME data streams as outlined in RFC 2046. In forms, there are a series of fields to be supplied by the user who fills out the form. Each field has a name. Within a given form, the names are unique.

Method Detail

values

public static Multipart.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Multipart.Type c : Multipart.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Multipart.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013 Square, Inc.. All Rights Reserved.