private static PutResponse getPutResponseFromStream(ConnectedChannel blockingChannel, PutRequest putRequest,
      ConnectionPool connectionPool) {
    PutResponse putResponse = null;
    try {
      blockingChannel.send(putRequest);
      DataInputStream stream = blockingChannel.receive().getInputStream();
      putResponse = PutResponse.readFrom(stream);
    } catch (Exception exception) {
      connectionPool.destroyConnection(blockingChannel);
      System.out.println("Unknown Exception Error" + exception);
      return null;
    }
    return putResponse;
  }
Method to send PutRequest and receive PutResponse to and from a blocking channel. If it fails, blocking channel is destroyed

@param blockingChannel BlockingChannel used to send and receive request and response
@param putRequest      PutRequest which has to be sent through the blockingchannel
@param connectionPool  ConnectionPool from which connections are checked out
@return PutResponse the response from the PutRequest made
ambry-tools/src/main/java/com/github/ambry/tools/admin/DirectoryUploader.java