Package org.graphstream.stream.file

Examples of org.graphstream.stream.file.FileSinkDGS


    public GraphCleared(Graph g) {
      this.data = null;

      try {
        FileSinkDGS sink = new FileSinkDGS();
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        GZIPOutputStream out = new GZIPOutputStream(bytes);

        sink.writeAll(g, out);
        out.flush();
        out.close();

        this.data = bytes.toByteArray();
      } catch (IOException e) {
View Full Code Here


  public void testOne() throws IOException {
    Graph g = new AdjacencyListGraph("g");
    ThreadProxyPipe tpp = new ThreadProxyPipe();
    tpp.init(g);

    FileSinkDGS dgs1 = new FileSinkDGS();
    FileSinkDGS dgs2 = new FileSinkDGS();
    StringWriter w1 = new StringWriter();
    StringWriter w2 = new StringWriter();

    Actor a = new Actor(tpp);
    Thread t = new Thread(a);

    g.addSink(dgs1);
    tpp.addSink(dgs2);

    dgs1.begin(w1);
    dgs2.begin(w2);

    t.start();
    generateRandom(g, 1000);

    try {
View Full Code Here

  @Before
  @Override
  public void setup() {
    input = new FileSourceDGS();
    output = new FileSinkDGS();
  }
View Full Code Here

TOP

Related Classes of org.graphstream.stream.file.FileSinkDGS

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.