public void end(String endType) throws IOException {
  dos.write(endType.getBytes());
  if (END_TOTAL.equals(endType)) {
    dos.flush();
  }
}

public void end ( String endType ) throws IOException { dos . write ( endType . getBytes ( ) ) ; if ( END_TOTAL . equals ( endType ) ) { dos . flush ( ) ; } }
the method that needs to be called at the end of a request / response or section . this places the end_total symbol on the link to let the other side know that the transmission is done , and it also flushes the output stream buffer .
