Java 类org.springframework.core.io.buffer.DefaultDataBufferFactory 实例源码

项目:spring-boot-admin    文件:LegacyEndpointConverters.java   
@SuppressWarnings("unchecked")
private static <S, T> Function<Flux<DataBuffer>, Flux<DataBuffer>> convertUsing(ParameterizedTypeReference<S> sourceType,
                                                                                ParameterizedTypeReference<T> targetType,
                                                                                Function<S, T> converterFn) {
    return input -> DECODER.decodeToMono(input, ResolvableType.forType(sourceType), null, null)
                           .map(body -> converterFn.apply((S) body))
                           .flatMapMany(output -> ENCODER.encode(Mono.just(output), new DefaultDataBufferFactory(),
                                   ResolvableType.forType(targetType), null, null));
}
项目:spring-webflux-client    文件:HttpServerErrorDecoderTest.java   
private DataBuffer create(String value) {
    return new DefaultDataBufferFactory().wrap(value.getBytes());
}
项目:spring-webflux-client    文件:HttpClientErrorDecoderTest.java   
private DataBuffer create(String value) {
    return new DefaultDataBufferFactory().wrap(value.getBytes());
}
项目:spring-webflux-client    文件:HttpServerErrorDecoderTest.java   
private DataBuffer create(String value) {
    return new DefaultDataBufferFactory().wrap(value.getBytes());
}
项目:spring-webflux-client    文件:HttpClientErrorDecoderTest.java   
private DataBuffer create(String value) {
    return new DefaultDataBufferFactory().wrap(value.getBytes());
}