uc.setRequestProperty("Authorization", "Basic " + encoded);
if (uc instanceof HttpURLConnection) {
if (((HttpURLConnection) uc).getResponseCode() != HttpURLConnection.HTTP_OK) {
InputStream content = ((HttpURLConnection) uc).getErrorStream();
StreamUtilities.inputStream(content, new InputStreamProcessor() {
@Override
public void process(InputStream input) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(input));
String line;
while ((line = in.readLine()) != null) {
result.append(line);
}
}
});
mError = true;
mExitValue = 1;
return result.toString();
}
}
StreamUtilities.inputStream(uc, new InputStreamProcessor() {
@Override
public void process(InputStream input) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(input));
String line;