graphdb/src/main/java/com/orientechnologies/orient/graph/graphml/OGraphSONReader.java
public void inputGraph(final String filename, int bufferSize, final Set<String> edgePropertyKeys,
      final Set<String> vertexPropertyKeys) throws IOException {
    final File file = new File(filename);
    if (!file.exists())
      throw new ODatabaseImportException("File '" + filename + "' not found");

    inputSize = file.length();
    final FileInputStream fis = new FileInputStream(filename);
    try {
      inputGraph(fis, bufferSize, edgePropertyKeys, vertexPropertyKeys);
    } finally {
      fis.close();
    }
  }
public void inputGraph(final String filename, int bufferSize, final Set<String> edgePropertyKeys,
      final Set<String> vertexPropertyKeys) throws IOException {
    final File file = new File(filename);
    if (!file.exists())
      throw new ODatabaseImportException("File '" + filename + "' not found");

    inputSize = file.length();
    final FileInputStream fis = new FileInputStream(filename);
    try {
      inputGraph(fis, bufferSize, edgePropertyKeys, vertexPropertyKeys);
    } finally {
      fis.close();
    }
  }
public void inputGraph ( final String filename , int bufferSize , final Set < String > edgePropertyKeys , final Set < String > vertexPropertyKeys ) throws IOException { final File file = new File ( filename ) ; if ( ! file . exists ( ) ) throw new ODatabaseImportException ( "File '" + filename + "' not found" ) ; inputSize = file . length ( ) ; final FileInputStream fis = new FileInputStream ( filename ) ; try { inputGraph ( fis , bufferSize , edgePropertyKeys , vertexPropertyKeys ) ; } finally { fis . close ( ) ; } }
Input the JSON stream data into the graph. More control over how data is streamed is provided by this method.

@param filename
name of a file of JSON data
@param bufferSize
the amount of elements to hold in memory before committing a transactions (only valid for TransactionalGraphs)
@throws IOException
thrown when the JSON data is not correctly formatted
Input the JSON stream data into the graph . More control over how data is streamed is provided by this method .