Android Open Source - Profiterole Waffle Utils






From Project

Back to project page Profiterole.

License

The source code is released under:

Apache License

If you think the Android project Profiterole 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 profiterole.waffle;
//  ww  w  .  j  a v  a  2 s  .  c  o  m
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import profiterole.api.Waffle;

public class WaffleUtils {
  
  private WaffleUtils() {
    throw new AssertionError("can't be here");
  }
  
  public static Waffle<?> readFromFile(File f) throws Exception {
    Waffle<?> waffle = null;
    FileInputStream fis = null;
    ObjectInputStream in = null;

    fis = new FileInputStream(f);
    in = new ObjectInputStream(fis);
    waffle = (Waffle<?>)in.readObject();
    in.close();
    return waffle;
  }

  public static void writeToFile(Waffle<?> w, File f) throws IOException {
    FileOutputStream fos = null;
    ObjectOutputStream out = null;

    fos = new FileOutputStream(f);
    out = new ObjectOutputStream(fos);
    out.writeObject(w);
    out.close();
  }
}




Java Source Code List

profiterole.android.DictionaryScreen.java
profiterole.android.SearchScreen.java
profiterole.api.MapReduce.java
profiterole.api.OnUpdateStatusCallback.java
profiterole.api.Waffle.java
profiterole.mapreduce.MapCallback.java
profiterole.mapreduce.MapReduceService.java
profiterole.mapreduce.Reducer.java
profiterole.mapreduce.Splitter.java
profiterole.samples.Driver.java
profiterole.samples.PrintPromptListener.java
profiterole.samples.REPL.java
profiterole.waffle.InvertedIndex.java
profiterole.waffle.WaffleBackend.java
profiterole.waffle.WaffleImpl.java
profiterole.waffle.WaffleUtils.java