Skip to content

Commit 0482f5c

Browse files
committed
first commit
1 parent c7efe3b commit 0482f5c

12 files changed

Lines changed: 3743 additions & 0 deletions

JUNG/.classpath

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
5+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-algorithms-2.0.1.jar"/>
6+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-api-2.0.1.jar"/>
7+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-graph-impl-2.0.1.jar"/>
8+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-io-2.0.1.jar"/>
9+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-jai-2.0.1.jar"/>
10+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-visualization-2.0.1.jar"/>
11+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/commons-collections4-4.0.jar"/>
12+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/collections-generic-4.01.jar"/>
13+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/colt-1.2.0.jar"/>
14+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/concurrent-1.3.4.jar"/>
15+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/j3d-core-1.3.1.jar"/>
16+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-3d-2.0.1.jar"/>
17+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-3d-demos-2.0.1.jar"/>
18+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-jai-samples-2.0.1.jar"/>
19+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/jung-samples-2.0.1.jar"/>
20+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/stax-api-1.0.1.jar"/>
21+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/vecmath-1.3.1.jar"/>
22+
<classpathentry kind="lib" path="C:/Users/Gabriel/Downloads/JUNG/wstx-asl-3.2.6.jar"/>
23+
<classpathentry kind="output" path="bin"/>
24+
</classpath>

JUNG/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>JUNG</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>

JUNG/bin/java.policy.applet

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* AUTOMATICALLY GENERATED ON Tue Apr 16 17:20:59 EDT 2002*/
2+
/* DO NOT EDIT */
3+
4+
grant {
5+
permission java.security.AllPermission;
6+
};
7+

JUNG/src/Connection.java

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import java.io.BufferedReader;
2+
import java.io.IOException;
3+
import java.io.InputStreamReader;
4+
import java.io.PrintWriter;
5+
import java.net.ServerSocket;
6+
import java.net.Socket;
7+
8+
9+
public class Connection {
10+
Socket clientSocket = null;
11+
BufferedReader in;
12+
PrintWriter out;
13+
14+
public Connection(int port) {
15+
ServerSocket serverSocket;
16+
17+
try {
18+
serverSocket = new ServerSocket(port);
19+
clientSocket = serverSocket.accept();
20+
in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
21+
out = new PrintWriter(clientSocket.getOutputStream(), true);
22+
} catch (IOException e) {
23+
e.printStackTrace();
24+
System.out.println("Could not listen on port: " + port);
25+
System.exit(-1);
26+
}
27+
28+
}
29+
30+
public String readLine() {
31+
try {
32+
return in.readLine();
33+
} catch (IOException e) {
34+
System.exit(0);
35+
}
36+
return null;
37+
}
38+
39+
public void sendMsg(String msg) {
40+
out.print(msg);
41+
out.flush();
42+
}
43+
}

0 commit comments

Comments
 (0)