code: public JSON readFromFile( File file ) {
        if( file == null ){
           throw new JSONException( "File is null" );
        }
        if( !file.canRead() ){
           throw new JSONException( "Can't read input file" );
        }
        if( file.isDirectory() ){
           throw new JSONException( "File is a directory" );
        }
        try{
           return readFromStream( new FileInputStream( file ) );
        }catch( IOException ioe ){
           throw new JSONException( ioe );
        }
     }
docs: Creates a JSON value from a File.
  
  @param file
  @return a JSONNull, JSONObject or JSONArray
  @throws JSONException if the conversion from XML to JSON can't be made for
  I/O or format reasons.