Android Open Source - android-google-spreadsheets-api Worksheet Entry Request






From Project

Back to project page android-google-spreadsheets-api.

License

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.

Java Source Code

package com.github.spreadsheets.android.api.requests;
/* www  .  jav a  2 s . c om*/
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Response;
import com.android.volley.toolbox.HttpHeaderParser;
import com.github.spreadsheets.android.api.model.WorksheetEntry;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class WorksheetEntryRequest extends SpreadsheetRequest<WorksheetEntry>{
    WorksheetEntryRequest(String url, Response.Listener<WorksheetEntry> listener,
                          Response.ErrorListener errorListener) {
        super(Method.GET, url, listener, errorListener);
    }

    @Override
    protected Response<WorksheetEntry> parseNetworkResponse(NetworkResponse response) {
        try {
            WorksheetEntry entry = parser
                    .parseAndClose(new InputStreamReader(new ByteArrayInputStream(response.data))
                            , WorksheetEntry.class);
            return Response.success(entry, HttpHeaderParser.parseCacheHeaders(response));
        } catch (IOException e) {
            return Response.error(new ParseError(e));
        }
    }
}




Java Source Code List

com.example.android.spreadsheet.sample.MainActivity.java
com.github.spreadsheets.android.api.model.Author.java
com.github.spreadsheets.android.api.model.BatchOperation.java
com.github.spreadsheets.android.api.model.BatchStatus.java
com.github.spreadsheets.android.api.model.CellEntry.java
com.github.spreadsheets.android.api.model.CellFeed.java
com.github.spreadsheets.android.api.model.Cell.java
com.github.spreadsheets.android.api.model.Content.java
com.github.spreadsheets.android.api.model.Entry.java
com.github.spreadsheets.android.api.model.Feed.java
com.github.spreadsheets.android.api.model.Link.java
com.github.spreadsheets.android.api.model.ListEntry.java
com.github.spreadsheets.android.api.model.ListFeed.java
com.github.spreadsheets.android.api.model.List.java
com.github.spreadsheets.android.api.model.SpreadsheetEntry.java
com.github.spreadsheets.android.api.model.SpreadsheetFeed.java
com.github.spreadsheets.android.api.model.SpreadsheetUrl.java
com.github.spreadsheets.android.api.model.WorksheetData.java
com.github.spreadsheets.android.api.model.WorksheetEntry.java
com.github.spreadsheets.android.api.model.WorksheetFeed.java
com.github.spreadsheets.android.api.oauth.SpreadsheetOAuthActivity.java
com.github.spreadsheets.android.api.oauth.SpreadsheetOAuth.java
com.github.spreadsheets.android.api.requests.CellEntryRequest.java
com.github.spreadsheets.android.api.requests.CellFeedRequest.java
com.github.spreadsheets.android.api.requests.ListEntryRequest.java
com.github.spreadsheets.android.api.requests.ListFeedRequest.java
com.github.spreadsheets.android.api.requests.SpreadsheetEntryRequest.java
com.github.spreadsheets.android.api.requests.SpreadsheetFeedRequest.java
com.github.spreadsheets.android.api.requests.SpreadsheetRequest.java
com.github.spreadsheets.android.api.requests.WorksheetEntryRequest.java
com.github.spreadsheets.android.api.requests.WorksheetFeedRequest.java