java - How to implement a binary to ascii conversion? (and vice versa) -


i want write 2 simple utilities:

  1. receives binary file, , converts text file (ascii format).
  2. receives text file in format of above file , restores original binary file.

the reason need stupid, still reason. have 2 computers - 1 internet access , 1 without. write software on 1 without internet. emails on 2nd one. need transfer binary files 1 (e.g. jars) communication between them clipboard (text only).

might localized problem - assume has solution in worlds of data encryption/compression/network transfer.

the thing come go on binary file , convert each byte it's hex representation - every byte i'll 2 ascii characters (i.e. 2 bytes). there better? (this solution doubles amount of info , might not possible transfer via clipboard)

one limitation - need java based solution (i want write myself)

google base64, , use apache commons codec have ready use implementation.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -