Class Boundary
- java.lang.Object
-
- org.glassfish.jersey.media.multipart.Boundary
-
public final class Boundary extends Object
Utility for creating boundary parameters.- Author:
- Paul Sandoz, Michal Gajdos
-
-
Field Summary
Fields Modifier and Type Field Description static StringBOUNDARY_PARAMETER
-
Constructor Summary
Constructors Constructor Description Boundary()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MediaTypeaddBoundary(MediaType mediaType)Transforms a media type and add a boundary parameter with a unique value if one is not already present.static StringcreateBoundary()Creates a unique boundary.
-
-
-
Field Detail
-
BOUNDARY_PARAMETER
public static final String BOUNDARY_PARAMETER
- See Also:
- Constant Field Values
-
-
Method Detail
-
addBoundary
public static MediaType addBoundary(MediaType mediaType)
Transforms a media type and add a boundary parameter with a unique value if one is not already present.- Parameters:
mediaType- ifnullthen a media type of "multipart/mixed" with a boundary parameter will be returned.- Returns:
- the media type with a boundary parameter.
-
createBoundary
public static String createBoundary()
Creates a unique boundary.- Returns:
- the boundary.
-
-