Can someone teach me how to export tables with BLOB to CSV using java? And I would later import them. Some concepts regarding this matter will do and some code to help explain things.
Thanks.
Can someone teach me how to export tables with BLOB to CSV using java?
Share
If it were me I would just encode the binary data and then write it out as you would any other field. Apache Commons has great API for this. I would use the Base32 or Base64 binary encoder based on your needs. This may be termed URL-Encoding but I’m not 100% sure…the concept is still the same, you are still just taking binary data and encoding it as a string:
And then to read it back in just do the reverse:
I think this will work well for you. URL encoding (or similar encodings) work well for this since they are designed to allow binary data to be safely transmitted as strings. If you’d rather not use the Apache Commons library you might be able to get by using Java’s URLEncoder.