Class BinaryStringConverter

java.lang.Object
FAtiMA.Core.util.parsers.BinaryStringConverter

public class BinaryStringConverter extends Object
this class contains methods to convert binary data (a byte array) into a string and vice versa. Currently uses very simple conversion transferring every byte into 2 characters that describe the hex value of the byte. In order to improve performance we could use Base64, but this will need some more work as Android and the regular sun api cannot use the same Base64 encoders/decoders and we want to keep FatiMA code compatible to both platforms more info about conversion here: http://www.javaworld.com/javatips/jw-javatip117.html
  • Constructor Details

    • BinaryStringConverter

      public BinaryStringConverter()
  • Method Details

    • encodeBinaryToString

      public static String encodeBinaryToString(byte[] input)
    • decodeStringToBinary

      public static byte[] decodeStringToBinary(String input)
    • main

      public static void main(String[] args)
      test the conversion routines in a standalone program