Advertisement
Guest User

Untitled

a guest
May 29th, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package com.instacart.library.persistence;
  2.  
  3. import android.content.Context;
  4.  
  5. import com.fasterxml.jackson.core.type.TypeReference;
  6.  
  7. import java.io.IOException;
  8. import java.util.List;
  9.  
  10. public class ILJsonCollectionFile<PAYLOAD> extends ILJsonFile<List<PAYLOAD>> {
  11.  
  12. private final String mTag;
  13.  
  14. public ILJsonCollectionFile(Context context, String filename, String tag) {
  15. super(context, filename, tag);
  16. mTag = tag;
  17. }
  18.  
  19. public void store(List<PAYLOAD> data) throws IOException {
  20. super.store(data);
  21. }
  22.  
  23. public List<PAYLOAD> read() throws IOException {
  24. TypeReference<List<PAYLOAD>> typeReference = new TypeReference<List<PAYLOAD>>() { };
  25. return read(typeReference);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement