Are you sure that you're getting an empty file and not a IllegalArgumentException because bufImg == null.
Because that is what I'm getting and that's because there is no ImageReader registered that can read the input.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
equally gets the conversion done. The fully qualified name of the class is sun.misc.BASE64Decoder and it 'ships' with java se (well, the Sun Oracle implementation).
For those who want to use this to convert a html dataURL to binary data (good old bytes), you'll keep getting exceptions if you try convert directly. That's because, dataURL contains some metadata (http://tools.ietf.org/html/rfc2397) before the actual data. It you print the data url, you'll see similar to:
I have had to break up the long lines inside the code tags because they make the whole thread difficult to read. You can see the right way to do it in the code tags and the wrong way in the quote tags.
You would have done it a lot better than me, because you would have put the " +↩" in the same places throughout.
Run away! Run away! Here, take this tiny ad with you:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth