|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.util.DataUri
public class DataUri
Represents a data URI.
Example: data:image/jpeg;base64,<base64-encoded text>
| Field Summary | |
|---|---|
protected String |
contentType
|
protected byte[] |
data
|
protected static Pattern |
regex
|
| Constructor Summary | |
|---|---|
DataUri(String uri)
|
|
DataUri(String contentType,
byte[] data)
|
|
| Method Summary | |
|---|---|
String |
getContentType()
Sets the content type. |
byte[] |
getData()
Gets the binary data. |
void |
setContentType(String contentType)
Sets the content type. |
void |
setData(byte[] data)
Sets the binary data. |
String |
toString()
|
URI |
toUri()
Creates a URI object from this data URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final Pattern regex
protected byte[] data
protected String contentType
| Constructor Detail |
|---|
public DataUri(String contentType,
byte[] data)
data - the binary datacontentType - the content type (e.g. "image/jpeg")public DataUri(String uri)
uri - the data URI to parse
IllegalArgumentException - if the given URI is not a valid data URI| Method Detail |
|---|
public byte[] getData()
public void setData(byte[] data)
data - the binary datapublic String getContentType()
public void setContentType(String contentType)
contentType - the content type (e.g. "image/jpeg")public URI toUri()
URI object from this data URI.
URI objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||