找到httpresponseexception 302

时间:2013-05-26 11:04:59

标签: android google-drive-api

借助Google云端硬盘的这项功能,我获得了一个httpresponseexception。有谁知道为什么?

public static InputStream downloadFile(Drive service, String myurl) {
if (myurl != null && myurl.length() > 0) {
    try {
        HttpResponse resp = service.getRequestFactory().buildGetRequest(new GenericUrl(myurl))
            .execute();
         System.out.println("***********"+resp.getContent());
         return resp.getContent();
    } catch (IOException e) {
        // An error occurred.
        e.printStackTrace();
        return null;
    }
    } else {
        // The file doesn't have any content stored on Drive.
        return null;
    }
}

0 个答案:

没有答案