All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.wglanzer.annosave.impl.AnnoReader Maven / Gradle / Ivy

There is a newer version: 1.2.4
Show newest version
package com.github.wglanzer.annosave.impl;

import com.github.wglanzer.annosave.impl.structure.SAnnotationContainer;
import com.github.wglanzer.annosave.impl.util.GsonUtil;
import com.google.gson.Gson;

import java.io.*;

/**
 * Reads an IAnnotationContainer from JSON
 *
 * @author W.Glanzer, 13.09.2017
 */
public class AnnoReader
{

  private final InputStream stream;

  public AnnoReader(InputStream pStream)
  {
    stream = pStream;
  }

  public SAnnotationContainer read()
  {
    Gson gson = GsonUtil.createGson();
    return gson.fromJson(new InputStreamReader(stream), SAnnotationContainer.class);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy