|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.util.DataUri
public final class DataUri
Represents a URI for encoding binary data.
Example: data:image/jpeg;base64,[base64 string]
| Constructor Summary | |
|---|---|
DataUri(String uri)
Parses a data URI string. |
|
DataUri(String contentType,
byte[] data)
Creates a data URI. |
|
| Method Summary | |
|---|---|
String |
getContentType()
Sets the content type. |
byte[] |
getData()
Gets 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 |
| Constructor Detail |
|---|
public DataUri(String contentType,
byte[] data)
contentType - the content type (e.g. "image/jpeg")data - the binary datapublic DataUri(String uri)
uri - the data URI to parse (e.g.
"data:image/jpeg;base64,[base64 string]")
IllegalArgumentException - if the given URI is not a valid data URI| Method Detail |
|---|
public byte[] getData()
public String getContentType()
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 | |||||||||