@@ -0,0 +1,1346 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage com.msbaudiosteganography.text;%0A%0A/**%0A *%0A * @author Afina, Meisyal, Irfan%0A */%0A%0Apublic class TextProcessor %7B%0A    public byte%5B%5D binaryStringToBytes(String binary) %7B%0A        byte%5B%5D buffer = new byte%5Bbinary.length()%5D;%0A        %0A        for (int i = 0; i %3C binary.length(); i++) %7B%0A            if (binary.charAt(i) == '0') %7B%0A                buffer%5Bi%5D = 0;%0A            %7D else %7B%0A                buffer%5Bi%5D = 1;%0A            %7D%0A        %7D%0A        %0A        return buffer;%0A    %7D%0A    %0A    public String stringToBinaryString(String message) %7B%0A        String buffer = new String();%0A        %0A        for (int i = 0; i %3C message.length(); i++) %7B%0A            String bit = Integer.toBinaryString(message.charAt(i));%0A            %0A            if (bit.length() %3C 8) %7B%0A                bit = %2200000000%22.substring(0, 8 - bit.length()).concat(bit);%0A            %7D else %7B%0A                bit = bit.substring(bit.length() - 8);%0A            %7D%0A            %0A            buffer = buffer.concat(bit);%0A        %7D%0A        %0A        return buffer;%0A    %7D%0A    %0A    public byte%5B%5D convertBinaryStringToBytes(String message) %7B%0A        return binaryStringToBytes(stringToBinaryString(message));%0A    %7D%0A%7D%0A

Add binary string to byte converter