/* Generic Threads for Asynchronous Read/Write (binary) */ import java.io.*; import java.net.Socket; // for sample main only class AsynchRead extends Thread //implements Runnable { protected DataInputStream din; protected byte[] buffer; // pointer to external buffer protected int si; // starting index to read into protected int len; // number of bytes to read public AsynchRead(DataInputStream d, byte[] b, int i, int l) { din=d; buffer = b; si=i; len=l; } public void run() { try { int n = 0; while (n