Ejemplo n.º 1
0
  public void loadDump(File dumpFile, File lineFile, File dumpInfoFile)
      throws FileNotFoundException, IOException {

    FileInputStream vertexStream = new FileInputStream(dumpFile);
    MappedByteBuffer inVertex =
        vertexStream.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, dumpFile.length());
    vertices = inVertex.asFloatBuffer();

    FileInputStream vertexLineStream = new FileInputStream(lineFile);
    MappedByteBuffer inLine;
    inLine = vertexLineStream.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, lineFile.length());
    stripVertexCounts = inLine.asIntBuffer();

    Scanner scanner = new Scanner(dumpInfoFile);

    String line;

    line = scanner.nextLine();
    minX = Float.parseFloat(line);
    line = scanner.nextLine();
    maxX = Float.parseFloat(line);
    line = scanner.nextLine();
    minY = Float.parseFloat(line);
    line = scanner.nextLine();
    maxY = Float.parseFloat(line);
  }