employing AES algorithm in Java
Line 105 is a typo. The indentation suggests its only executed if output is not null. 

But it's actually unrelated to the if statement. 

You should always use curly braces even if execution is only 1 line long. This goes for all statements: while, if, do, etc.