This blog records some ideas, notes, and information of my works and studies in information technology.

Thursday, June 11, 2009

How to save binary data into Database

There are two ways to solve this problem.
  1. Base64: http://en.wikipedia.org/wiki/Base64
    This encoding method can transform binary data into special text format. The encoding method requires some future research!
  2. Hex: Transfer Hex byte into Hex String! The advantage of this encoding method is readable!
    ex: byte[]{00, a0, 30} --> String: "00a030"
Both encoding methods can be found in apache commons codec package!
These are two only ways to transfer binary data into Database.

No comments:

Post a Comment