Generic file access utility for Java