After I had a lot of problems with preemptive authentication , I got it finally working. Now the next problem. I want to get a file with it, but I don\'t know how. I thought
Well, I solved it myself now - here the solution:
StringBuffer tmp = new StringBuffer(); // for content
if (entity != null) {
InputStream is = entity.getContent();
int l = 0;
byte[] t = new byte[1024];
while ((l = is.read(t)) != -1) {
for (int i=0; i<l ; i++){
tmp.append((char)t[i]);
}
}
}
return tmp.toString();