Java AES file encryption/decryption
As far as security goes, rather than just using "AES" for your algorithm, from the documentation:


  Every implementation of the Java platform is required to support the
  following standard Cipher transformations with the keysizes in
  parentheses:
  
  
  AES/CBC/NoPadding (128)
  AES/CBC/PKCS5Padding (128)
  AES/ECB/NoPadding (128)
  AES/ECB/PKCS5Padding (128)
  AES/GCM/NoPadding (128)
  DES/CBC/NoPadding (56)
  DES/CBC/PKCS5Padding (56)
  DES/ECB/NoPadding (56)
  DES/ECB/PKCS5Padding (56)
  DESede/CBC/NoPadding (168)
  DESede/CBC/PKCS5Padding (168)
  DESede/ECB/NoPadding (168)
  DESede/ECB/PKCS5Padding (168)
  RSA/ECB/PKCS1Padding (1024, 2048)
  RSA/ECB/OAEPWithSHA-1AndMGF1Padding (1024, 2048)
  RSA/ECB/OAEPWithSHA-256AndMGF1Padding (1024, 2048)
  


Likewise, here's more documentation on the subject of what is supported.

If you're unsure which one to choose, this answer will shed some light. Here's the summary:


  In general, stick with CBC or CTR, with PKCS#7 where necessary (you don't need padding on stream cipher modes) and use an authenticity check (HMAC-SHA256 for example) on the ciphertext. Both CBC and CTR come recommended by Niels Ferguson and Bruce Schneier, both of whom are respected cryptographers.


What's the difference between PKCS5 and PKCS7?


  ... fundamentally PKCS#5 padding is a subset of PKCS#7 padding for 8 byte block sizes. Hence, PKCS#5 padding can not be used for AES ...
  
  Some cryptographic libraries such as the SUN provider in Java indicate PKCS#5 where PKCS#7 should be used - "PKCS5Padding" should have been "PKCS7Padding". This is a legacy from the time that only 8 byte block ciphers such as (triple) DES symmetric cipher were available.


However, that doesn't stop you from using PKCS#5 with AES.

Given the answers to the question linked above, I would suggest using the following:

"AES/CBC/PKCS5Padding"

After that, reading erikson's answer will tell you most of what you need to know about how to write this code in a relatively secure manner.