com.ibm.portal.resolver.data
Class DataURI
java.lang.Object
com.ibm.portal.resolver.uri.BaseURI
com.ibm.portal.resolver.data.DataURI
- All Implemented Interfaces:
- Constants
-
public class DataURI
- extends BaseURI
An URI class that represents data URIs as defined in
http://tools.ietf.org/html/rfc2397
- Since:
- 6.1.0.2
Constructor Summary
|
DataURI(java.net.URI dataURI)
|
Method Summary
|
javax.mail.internet.ContentType |
getContentType()
Return the content type of the URI |
java.lang.String |
getData()
Return the data of the URI |
boolean |
isBase64()
Check if the content of the URI is base64 encoded |
static java.net.URI |
newInstance(javax.mail.internet.ContentType ct,
boolean bIsBase64,
java.lang.String data)
Create a new instance of a data URI |
Methods inherited from class com.ibm.portal.resolver.uri.BaseURI
|
createURI, createURI, createURI, createURI, decode, decode, decode, decode, encode, encode, normalizeRawSchemeSpecificPart, normalizeRawSchemeSpecificPart |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCHEME_DATA
public static final java.lang.String SCHEME_DATA
- See Also:
- Constant Field Values
DataURI
public DataURI(java.net.URI dataURI)
throws java.net.URISyntaxException,
javax.mail.internet.ParseException
- Throws:
- java.net.URISyntaxException
- javax.mail.internet.ParseException
newInstance
public static java.net.URI newInstance(javax.mail.internet.ContentType ct,
boolean bIsBase64,
java.lang.String data)
throws java.io.IOException,
java.net.URISyntaxException
- Create a new instance of a data URI
- Parameters:
- ct - the content type
- bIsBase64 - true if the data is base64 encoded, else false
- data - the data
- Returns:
- the URI
- Throws:
- java.io.IOException
- java.net.URISyntaxException
getContentType
public javax.mail.internet.ContentType getContentType()
- Returns the content type of the URI
- Returns:
- the content type
getData
public java.lang.String getData()
- Returns the data of the URI
- Returns:
- the data
isBase64
public boolean isBase64()
- Checks if the content of the URI is base64 encoded
- Returns:
- true if the content is base64 encoded, else false