Back to project page android-google-spreadsheets-api.
The source code is released under:
Apache License
If you think the Android project android-google-spreadsheets-api listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.spreadsheets.android.api.requests; //from www . ja v a 2 s . c om import com.android.volley.NetworkResponse; import com.android.volley.ParseError; import com.android.volley.Response; import com.android.volley.Response.ErrorListener; import com.android.volley.Response.Listener; import com.android.volley.toolbox.HttpHeaderParser; import com.github.spreadsheets.android.api.model.WorksheetFeed; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStreamReader; public class WorksheetFeedRequest extends SpreadsheetRequest<WorksheetFeed> { public WorksheetFeedRequest(String url, Listener<WorksheetFeed> listener, ErrorListener errorListener) { super(Method.GET, url, listener, errorListener); } @Override protected Response<WorksheetFeed> parseNetworkResponse(NetworkResponse response) { try { WorksheetFeed feed = parser .parseAndClose(new InputStreamReader(new ByteArrayInputStream(response.data)) , WorksheetFeed.class); return Response.success(feed, HttpHeaderParser.parseCacheHeaders(response)); } catch (IOException e) { return Response.error(new ParseError(e)); } } }