Class Boundary
- java.lang.Object
-
- org.glassfish.jersey.media.multipart.Boundary
-
public final class Boundary extends java.lang.Object
Utility for creating boundary parameters.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BOUNDARY_PARAMETER
private static java.util.concurrent.atomic.AtomicInteger
boundaryCounter
-
Constructor Summary
Constructors Constructor Description Boundary()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.ws.rs.core.MediaType
addBoundary(javax.ws.rs.core.MediaType mediaType)
Transforms a media type and add a boundary parameter with a unique value if one is not already present.static java.lang.String
createBoundary()
Creates a unique boundary.
-
-
-
Field Detail
-
BOUNDARY_PARAMETER
public static final java.lang.String BOUNDARY_PARAMETER
- See Also:
- Constant Field Values
-
boundaryCounter
private static final java.util.concurrent.atomic.AtomicInteger boundaryCounter
-
-
Method Detail
-
addBoundary
public static javax.ws.rs.core.MediaType addBoundary(javax.ws.rs.core.MediaType mediaType)
Transforms a media type and add a boundary parameter with a unique value if one is not already present.- Parameters:
mediaType
- ifnull
then a media type of "multipart/mixed" with a boundary parameter will be returned.- Returns:
- the media type with a boundary parameter.
-
createBoundary
public static java.lang.String createBoundary()
Creates a unique boundary.- Returns:
- the boundary.
-
-