Search in sources :

Example 1 with GsonConverter

use of com.bourke.glimmr.tape.GsonConverter in project glimmr by brk3.

the class TaskQueueDelegateFactory method get.

public FileObjectQueue<T> get(String fileName, Class<T> taskType) {
    final Converter<T> converter = new GsonConverter<T>(new Gson(), taskType);
    final File queueFile = new File(mContext.getFilesDir(), fileName);
    FileObjectQueue<T> delegate = null;
    try {
        delegate = new FileObjectQueue<T>(queueFile, converter);
    } catch (IOException e) {
        // TODO: how should we handle this
        e.printStackTrace();
    }
    return delegate;
}
Also used : GsonConverter(com.bourke.glimmr.tape.GsonConverter) Gson(com.google.gson.Gson) IOException(java.io.IOException) File(java.io.File)

Aggregations

GsonConverter (com.bourke.glimmr.tape.GsonConverter)1 Gson (com.google.gson.Gson)1 File (java.io.File)1 IOException (java.io.IOException)1