public void reset(){
  len=4;
  pos=4;
  Arrays.fill(buf,(byte)0);
}

public void reset ( ) { len = 4 ; pos = 4 ; Arrays . fill ( buf , ( byte ) 0 ) ; }
prepare this packet for accumulating a message to be written . set the write position to just after the header ( but leave the length unwritten , because it is as yet unknown ) .
