i'll try to explain it a bit more simple.
you have your application A.
create an interface I. Add a method hurraTheDataAreThere(byte[] data).
Let A implement I.
Alter your connection thread to take an I as a parameter.
The interface there is to limit the access to only this one method.
In code this would look something like
Code:
//in your app
I callback = this;
new ConnectionThread(callback).start();
//in the connectionthread after the data are there
callback.hurraTheDataAreThere(data);
//in the application:
public void hurraTheDataAreThere(byte[] data){
System.out.println("hurra, the data are there! And they are "+data.length+" long");
}
in general you could also just pass the application object to your connection thread. but better to start with best practices instead of learning them later.