Coverage Report - org.dishevelled.graph.io.GraphWriter
 
Classes in this File Line Coverage Branch Coverage Complexity
GraphWriter
N/A
N/A
1
 
 1  
 /*
 2  
 
 3  
     dsh-graph-io  Directed graph readers and writers.
 4  
     Copyright (c) 2008-2013 held jointly by the individual authors.
 5  
 
 6  
     This library is free software; you can redistribute it and/or modify it
 7  
     under the terms of the GNU Lesser General Public License as published
 8  
     by the Free Software Foundation; either version 3 of the License, or (at
 9  
     your option) any later version.
 10  
 
 11  
     This library is distributed in the hope that it will be useful, but WITHOUT
 12  
     ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or
 13  
     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 14  
     License for more details.
 15  
 
 16  
     You should have received a copy of the GNU Lesser General Public License
 17  
     along with this library;  if not, write to the Free Software Foundation,
 18  
     Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
 19  
 
 20  
     > http://www.fsf.org/licensing/licenses/lgpl.html
 21  
     > http://www.opensource.org/licenses/lgpl-license.php
 22  
 
 23  
 */
 24  
 package org.dishevelled.graph.io;
 25  
 
 26  
 import java.io.File;
 27  
 import java.io.IOException;
 28  
 import java.io.OutputStream;
 29  
 
 30  
 import org.dishevelled.graph.Graph;
 31  
 
 32  
 /**
 33  
  * Graph writer.
 34  
  *
 35  
  * @param <N> node value type
 36  
  * @param <E> edge value type
 37  
  * @author  Michael Heuer
 38  
  * @version $Revision$ $Date$
 39  
  */
 40  
 public interface GraphWriter<N, E>
 41  
 {
 42  
 
 43  
     /**
 44  
      * Write the specified graph to the specified file.
 45  
      *
 46  
      * @param graph graph to write, must not be null
 47  
      * @param file file to write to, must not be null
 48  
      * @throws IOException if an IO error occurs
 49  
      */
 50  
     void write(Graph<N, E> graph, File file) throws IOException;
 51  
 
 52  
     /**
 53  
      * Write the specified graph to the specified output stream.
 54  
      *
 55  
      * @param graph graph to write, must not be null
 56  
      * @param outputStream output stream to write to, must not be null
 57  
      * @throws IOException if an IO error occurs
 58  
      */
 59  
     void write(Graph<N, E> graph, OutputStream outputStream) throws IOException;
 60  
 }