All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.up.uca.rs.mime.resolver.BufferResolver Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.rs.mime.resolver;

import io.vertx.core.buffer.Buffer;
import io.vertx.ext.web.RoutingContext;
import io.vertx.up.atom.Epsilon;
import io.vertx.up.exception.WebException;
import io.vertx.up.uca.rs.mime.Resolver;

public class BufferResolver implements Resolver {

    @Override
    @SuppressWarnings("all")
    public Epsilon resolve(final RoutingContext context,
                              final Epsilon income)
        throws WebException {
        final Class clazz = income.getArgType();
        if (Buffer.class == clazz) {
            final Buffer body = context.getBody();
            income.setValue((T) body);
        }
        return income;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy