Open AndroidDeveloperLB opened 1 year ago
BufferedOutputStream
into the VCardWriter
constructor. The output stream is closed when you call VCardWriter.close()
.PartialDate
for the birthday property, as long as you're creating a 4.0 vCard.@mangstadt
Maybe as such:
val partialDate =
PartialDate.builder().date(birthdate.date).month(birthdate.month + 1).year(birthdate.year + 1900).build()
?
Not sure why the support for File
was removed?
It's an old API that is very widely used and not deprecated.
It didn't prevent adding support for Path
in any way.
It was something I did as a personal project because the new APIs are more pleasant to work with.
Apart from the jump to the newer APIs, not much changed in this version (see the Changelog). So if you are worried about missing out on bug/security fixes or new features, there were none (not counting the dependency updates, which you can exclude from your build if your project does not use them).
ez-vcard is very stable and I don't expect there to be many more updates.
Self note: Support for java.time
and java.nio.file
was added in API 26 (Android 8.0), which was released on 8/21/2017.
See "Updated Java language support" section in: https://developer.android.com/about/versions/oreo/android-8.0
After updating to 0.12.0 , I've noticed that it has some changes that I hope I've found proper alternatives to them:
VCardWriter
and maybe also others. There is Path instead, but it requires API 26 while the app I work on is for Android API 21 and above. Is it ok to use this instead:?
Does it auto-close the stream?
Birthday
doesn't support providingDate
class to it. I can't use Temporal as it requires API 26 . Is it ok to convert toPartialDate
? Would work the same? Meaning like this:I tried to find information on the repository, but found only what has changed, and not how to migrate: https://github.com/mangstadt/ez-vcard/wiki/Changelog
Please help.