class RangePartHeaderSerializer implements Serializer<RangePartHeader> {

    @Override
    public String serialize(final RangePartHeader input) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(DASH_DASH)
                .append(input.getBoundary())
                .append(NEW_LINE)
                .append(Headers.HEADER_CONTENT_TYPE)
                .append(": ")
                .append(input.getContentType())
                .append(NEW_LINE)
                .append(Headers.HEADER_CONTENT_RANGE)
                .append(": bytes ")
                .append(input.getRange().getFrom())
                .append("-")
                .append(input.getRange().getTo())
                .append("/")
                .append(input.getTotalLength())
                .append(NEW_LINE)
                .append(NEW_LINE);

        return stringBuilder.toString();
    }

}