title: Implementing read-lock and reading a file on a server or implemeting write lock and writing on a file on server
body: <p>How can a file on a server be read or be written on by a client. What is the procedure for implementing read/write lock using sockets programming in Java? 
  (If there is a post on stackoverflow that answers this question already please refer me to that because I cannot find it).</p>