be.ac.ulg.montefiore.run.totem.util
Class TrafficMatrixFileConvertor

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.util.TrafficMatrixFileConvertor

public class TrafficMatrixFileConvertor
extends java.lang.Object

This class contains several methods to convert traffic matrix files from one version of the schema to another.

Creation date: 10-mars-2005

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Constructor Summary
TrafficMatrixFileConvertor()
           
 
Method Summary
static void updateTrafficMatrix11To12(java.lang.String fileName, java.lang.String targetFileName)
          convert Traffic Matrix file from 1.1 to 1.2 : change format (date -> dateTime), update version number.
static void updateTrafficMatrix1To11(java.lang.String fileName, java.lang.String targetFileName)
          This method updates the traffic matrix file fileName to a traffic matrix file 1.1 valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrafficMatrixFileConvertor

public TrafficMatrixFileConvertor()
Method Detail

updateTrafficMatrix1To11

public static void updateTrafficMatrix1To11(java.lang.String fileName,
                                            java.lang.String targetFileName)
                                     throws java.io.FileNotFoundException,
                                            java.io.IOException
This method updates the traffic matrix file fileName to a traffic matrix file 1.1 valid. The name of the new file is given by targetFileName. If the update fails, the created file is deleted and error messages are printed using logging facilities.

Parameters:
fileName - The file to update.
targetFileName - The target file name. It can be equal to fileName.
Throws:
java.io.FileNotFoundException - If the file fileName doesn't exist or can't be opened for reading.
java.io.IOException - If an I/O error occurs when reading the file fileName or creating the file targetFileName.

updateTrafficMatrix11To12

public static void updateTrafficMatrix11To12(java.lang.String fileName,
                                             java.lang.String targetFileName)
                                      throws java.io.IOException
convert Traffic Matrix file from 1.1 to 1.2 : change format (date -> dateTime), update version number.

Parameters:
fileName -
targetFileName -
Throws:
java.io.IOException


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.