Method and device for accessing external data