CPS406/606 Class examples, Lecture 4 Java, Fall 99
Multithreading
Using Threads
Threads with pause and resume
Producer/Consumer one-element buffer with no synchronization
Producer/Consumer one-element buffer with synchronization
Producer/Consumer array buffer with synchronization
Streams and I/O
Create a Sequential File (of bytes)
Read a Sequential File (of bytes)
Read and Write a Sequential Text File, buffered
System.in and System.out
Concatenate Files
Using the File class to get information about a file or directory
Use StreamTokenizer to read and parse data from a file and display in a textarea
Similar example with StreamTokenizer but using a canvas to display the data
CGI and Servlets
CGI examples with Perl
Java Servlet examples
Networking with Sockets
SocketTest.java
is a client that connects to a date server.
EchoServer.java
is a server that echoes lines for one client.
ThreadedEchoServer.java
is a server that echoes lines for multiple clients.
EchoClient.java
is a client applet connects to either echo server.