Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.instacart.library.persistence;
- import android.content.Context;
- import com.fasterxml.jackson.core.type.TypeReference;
- import java.io.IOException;
- import java.util.List;
- public class ILJsonCollectionFile<PAYLOAD> extends ILJsonFile<List<PAYLOAD>> {
- private final String mTag;
- public ILJsonCollectionFile(Context context, String filename, String tag) {
- super(context, filename, tag);
- mTag = tag;
- }
- public void store(List<PAYLOAD> data) throws IOException {
- super.store(data);
- }
- public List<PAYLOAD> read() throws IOException {
- TypeReference<List<PAYLOAD>> typeReference = new TypeReference<List<PAYLOAD>>() { };
- return read(typeReference);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement