How to create a Data Link Control Protocol using Java ?