private void writeHostInfo(final DataOutputStream out, final HostInfo hostInfo) throws IOException {
        out.writeUTF(hostInfo.host());
        out.writeInt(hostInfo.port());
    }
@throws TaskAssignmentException if method fails to encode the data, e.g., if there is an
IO exception during encoding
streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentInfo.java