dataurl := "data:" [ mediatype ] [ ";base64" ] "," data mediatype := [ type "/" subtype ] *( ";" parameter ) data := *urlchar parameter := attribute "=" value value := token / quoted-string
According to these BNFs from the RFC, a comma that separates data from the mime type can actually be displayed both in the mime type and in the data, so there is no easy way (e.g. reg ex) to split the URI into parts. Thus, a complete parser is needed.
I am wondering if anyone knows of any data URI libraries in Java? My search on Google brought nothing.
source share