/**
 * Project RSA Algorithm.
 * Copyright Michał Szczygieł.
 * Created at Feb 24, 2014.
 */

import java.io.IOException;
import java.io.OutputStream;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

/**
 * This class is resposnible for testing and representation data for RSA
 * encryption algorithm.
 * 
 * @author Michał Szczygieł <michal.szczygiel@wp.pl>
 * 
 */
public class Main {

    /**
     * This logger is responsible for the registration of events.
     */
    static final Logger logger = LogManager.getLogger(Main.class.getName());

    /**
     * This method sets up configuration for loggers.
     */
    private static void loggerSetup() {
        // BasicConfigurator.configure();
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        loggerSetup();
        RSA rsa = new RSA(1024);

        try {
            OutputStream encryptedStream = IOOperations.encryptStream(
                    IOOperations.readFile("data.txt"), rsa, RSA.BLOCK_SIZE);
            logger.info(encryptedStream.toString());
            logger.info(IOOperations.decryptStream(encryptedStream, rsa,
                    RSA.BLOCK_SIZE));
        } catch (IOException e) {
            logger.debug(e);
            logger.error(e);
        }
    }

}

@@ -797,24 +797,60 @@
 g%5B%5D args) %7B%0A
+        if (args.length == 1) %7B%0A    
         logg
@@ -868,16 +868,20 @@
         
+   
+ 
 RSA rsa 
@@ -910,14 +910,22 @@
     
+    
 try %7B%0A
+    
     
@@ -1011,16 +1011,20 @@
         
+   
+ 
 IOOperat
@@ -1041,18 +1041,15 @@
 ile(
-%22data.txt%22
+args%5B0%5D
 ), r
@@ -1073,32 +1073,36 @@
 E);%0A            
+   
+ 
 logger.info(encr
@@ -1122,24 +1122,28 @@
 oString());%0A
+    
             
@@ -1223,16 +1223,20 @@
         
+ 
+   
 RSA.BLOC
@@ -1241,24 +1241,28 @@
 OCK_SIZE));%0A
+    
         %7D ca
@@ -1291,24 +1291,28 @@
             
+    
 logger.debug
@@ -1324,24 +1324,28 @@
             
+  
+  
 logger.error
@@ -1345,24 +1345,135 @@
 r.error(e);%0A
+            %7D%0A        %7D else %7B%0A            logger.warn(%22The application needs 1 argument as file to encrypt%22);%0A
         %7D%0A  

Add parameter to app as executable file