class AbstractMavenTransferListener extends AbstractTransferListener {
    public static final String STYLE = ".transfer:-faint";

    protected final MessageBuilderFactory messageBuilderFactory;
    protected final PrintStream out;

    protected AbstractMavenTransferListener(MessageBuilderFactory messageBuilderFactory, PrintStream out) {
        this.messageBuilderFactory = messageBuilderFactory;
        this.out = out;
    }

    @Override
    public void transferInitiated(TransferEvent event) {
        String action = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
        String direction = event.getRequestType() == TransferEvent.RequestType.PUT ? "to" : "from";

        TransferResource resource = event.getResource();
        MessageBuilder message = messageBuilderFactory.builder();
        message.style(STYLE).append(action).append(' ').append(direction).append(' ');
        message.resetStyle().append(resource.getRepositoryId());
        message.style(STYLE).append(": ").append(resource.getRepositoryUrl());
        message.resetStyle().append(resource.getResourceName());

        out.println(message.toString());
    }

    @Override
    public void transferCorrupted(TransferEvent event) throws TransferCancelledException {<FILL_FUNCTION_BODY>}

    @Override
    public void transferSucceeded(TransferEvent event) {
        String action = (event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded");
        String direction = event.getRequestType() == TransferEvent.RequestType.PUT ? "to" : "from";

        TransferResource resource = event.getResource();
        long contentLength = event.getTransferredBytes();
        FileSizeFormat format = new FileSizeFormat(Locale.ENGLISH);

        MessageBuilder message = messageBuilderFactory.builder();
        message.append(action).style(STYLE).append(' ').append(direction).append(' ');
        message.resetStyle().append(resource.getRepositoryId());
        message.style(STYLE).append(": ").append(resource.getRepositoryUrl());
        message.resetStyle().append(resource.getResourceName());
        message.style(STYLE).append(" (").append(format.format(contentLength));

        long duration = System.currentTimeMillis() - resource.getTransferStartTime();
        if (duration > 0L) {
            double bytesPerSecond = contentLength / (duration / 1000.0);
            message.append(" at ");
            format.format(message, (long) bytesPerSecond);
            message.append("/s");
        }

        message.append(')').resetStyle();
        out.println(message.toString());
    }
}

        TransferResource resource = event.getResource();
        // TODO This needs to be colorized
        out.println("[WARNING] " + event.getException().getMessage() + " from " + resource.getRepositoryId() + " for "
                + resource.getRepositoryUrl() + resource.getResourceName());
    
<no_super_class>