private void sendResponse(Status status, String firstBadLink, String message, DataOutputStream out) throws IOException { Builder builder = BlockOpResponseProto.newBuilder().setStatus(status); if (firstBadLink != null) { builder.setFirstBadLink(firstBadLink); } if (message != null) { builder.setMessage(message); } builder.build() .writeDelimitedTo(out); }
private void sendResponse(Status status, String firstBadLink, String message, DataOutputStream out) throws IOException { Builder builder = BlockOpResponseProto.newBuilder().setStatus(status); if (firstBadLink != null) { builder.setFirstBadLink(firstBadLink); } if (message != null) { builder.setMessage(message); } builder.build().writeDelimitedTo(out); }