Class ContentIDUtils
java.lang.Object
org.jboss.resteasy.plugins.providers.multipart.ContentIDUtils
Utility class to help generate, convert RFC compliant Content-ID and cid.
- Author:
- Attila Kiraly
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
convertContentIDToCid
(String contentID) static String
generateCidFromAddrSpec
(String addrSpec) Helper method to generate a standards-compliant cid url from the supplied addrSpec.static String
CallsgenerateContentIDFromAddrSpec(String)
withgenerateRFC822AddrSpec()
as parameter.static String
generateContentIDFromAddrSpec
(String addrSpec) Helper method to generate a standards-compliant Content-ID header value from the supplied addrSpec.static String
Helper method to generate a standards-compliant, random addr-spec as described in RFC822.static String
static String
parseAddrSpecFromContentID
(String contentID)
-
Field Details
-
CID_URL_SCHEME
- See Also:
-
-
Constructor Details
-
ContentIDUtils
public ContentIDUtils()
-
-
Method Details
-
generateContentID
CallsgenerateContentIDFromAddrSpec(String)
withgenerateRFC822AddrSpec()
as parameter.- Returns:
- the generated Content-ID
-
generateContentIDFromAddrSpec
-
generateRFC822AddrSpec
Helper method to generate a standards-compliant, random addr-spec as described in RFC822.- Returns:
- the generated addrSpec
-
generateCidFromAddrSpec
Helper method to generate a standards-compliant cid url from the supplied addrSpec. This implementation URL encodes everything without considering if it is needed or not. Used rfc-s: RFC2392, RFC822- Parameters:
addrSpec
- addrSpec- Returns:
- the generated Content-ID
-
parseAddrSpecFromCid
-
parseAddrSpecFromContentID
-
convertCidToContentID
-
convertContentIDToCid
-