GraphStream Users

Archives de la liste Aide


Re: Not a regular file error


Chronologique Discussions 
  • From: Ademir Gabardo <ademir.gabbardo AT gmail.com>
  • To: <graphstream-users AT litislab.fr>, Zakaria Boulouard <zboulouard AT gmail.com>
  • Subject: Re: Not a regular file error
  • Date: Tue, 16 Feb 2016 07:09:55 +1100

Not a regular file  means that your file can no be read by java.
The .jar file don’t have permission to read, e.g. File is open in another program, or, may you have blank spaces in the end of the file.
I also had similar error message when the path to the file was wrong (I was expecting to see a File Not Found Exception in this case), check the path, just in case.

Kind Regards,
Ademir

From: Zakaria Boulouard <zboulouard AT gmail.com>
Reply-To: <graphstream-users AT litislab.fr>, Zakaria Boulouard <zboulouard AT gmail.com>
Date: Tuesday, February 16, 2016 at 1:30 AM
To: <graphstream-users AT litislab.fr>
Subject: Not a regular file error

Hello,

I would like to open a ".gexf" file using graphstream. I followed the tutorial in here but it gave me this error : 

java.io.IOException: not a regular file 'sources/small-world-1.gexf'

This is the code I made :

public static void main(String[] args) {
String filePath = "sources/small-world-1.gexf";
Graph g = new DefaultGraph("g");
FileSource fs = null;
try {
fs = FileSourceFactory.sourceFor(filePath);

fs.addSink(g);
fs.begin(filePath);

while (fs.nextEvents()) {
// Optionally some code here ...
}
fs.end();
} catch( IOException e) {
e.printStackTrace();

}

What did I do wrong ? And how can I fix it ?

Thanks!
--
Zakaria BOULOUARD
Doctorant-Ingénieur en Intelligence Économique
N° Téléphone: (+212)662193321



Archives gérées par MHonArc 2.6.16.

Top of page