From f35f7db29bb1cc02ce602dceb4846ccef551423e Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Tue, 11 Sep 2018 13:34:57 +0200 Subject: [PATCH] Removed deprecated methods. --- .../core/io/buffer/DataBufferUtils.java | 84 ------------------- 1 file changed, 84 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java index e52e711a001..5394ba91990 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java @@ -63,26 +63,6 @@ public abstract class DataBufferUtils { // Reading //--------------------------------------------------------------------- - /** - * Read the given {@code InputStream} into a read-once {@code Flux} of - * {@code DataBuffer}s. Closes the input stream when the flux is terminated. - *

The resulting {@code Flux} can only be subscribed to once. See - * {@link #readInputStream(Callable, DataBufferFactory, int)} for a variant that supports - * multiple subscriptions. - * @param inputStream the input stream to read from - * @param dataBufferFactory the factory to create data buffers with - * @param bufferSize the maximum size of the data buffers - * @return a flux of data buffers read from the given channel - * @deprecated as of Spring 5.0.3, in favor of - * {@link #readInputStream(Callable, DataBufferFactory, int)}, to be removed in Spring 5.1 - */ - @Deprecated - public static Flux read( - InputStream inputStream, DataBufferFactory dataBufferFactory, int bufferSize) { - - return readInputStream(() -> inputStream, dataBufferFactory, bufferSize); - } - /** * Obtain a {@link InputStream} from the given supplier, and read it into a {@code Flux} * of {@code DataBuffer}s. Closes the input stream when the flux is terminated. @@ -99,26 +79,6 @@ public abstract class DataBufferUtils { return readByteChannel(() -> Channels.newChannel(inputStreamSupplier.call()), dataBufferFactory, bufferSize); } - /** - * Read the given {@code ReadableByteChannel} into a read-once {@code Flux} - * of {@code DataBuffer}s. Closes the channel when the flux is terminated. - *

The resulting {@code Flux} can only be subscribed to once. See - * {@link #readByteChannel(Callable, DataBufferFactory, int)} for a variant that supports - * multiple subscriptions. - * @param channel the channel to read from - * @param dataBufferFactory the factory to create data buffers with - * @param bufferSize the maximum size of the data buffers - * @return a flux of data buffers read from the given channel - * @deprecated as of Spring 5.0.3, in favor of - * {@link #readByteChannel(Callable, DataBufferFactory, int)}, to be removed in Spring 5.1 - */ - @Deprecated - public static Flux read( - ReadableByteChannel channel, DataBufferFactory dataBufferFactory, int bufferSize) { - - return readByteChannel(() -> channel, dataBufferFactory, bufferSize); - } - /** * Obtain a {@link ReadableByteChannel} from the given supplier, and read it into a * {@code Flux} of {@code DataBuffer}s. Closes the channel when the flux is terminated. @@ -145,50 +105,6 @@ public abstract class DataBufferUtils { ); } - /** - * Read the given {@code AsynchronousFileChannel} into a read-once {@code Flux} - * of {@code DataBuffer}s. Closes the channel when the flux is terminated. - *

The resulting {@code Flux} can only be subscribed to once. See - * {@link #readAsynchronousFileChannel(Callable, DataBufferFactory, int)} for a variant that - * supports multiple subscriptions. - * @param channel the channel to read from - * @param dataBufferFactory the factory to create data buffers with - * @param bufferSize the maximum size of the data buffers - * @return a flux of data buffers read from the given channel - * @deprecated as of Spring 5.0.3, in favor of - * {@link #readAsynchronousFileChannel(Callable, DataBufferFactory, int)}, to be removed in - * Spring 5.1 - */ - @Deprecated - public static Flux read( - AsynchronousFileChannel channel, DataBufferFactory dataBufferFactory, int bufferSize) { - - return readAsynchronousFileChannel(() -> channel, dataBufferFactory, bufferSize); - } - - /** - * Read the given {@code AsynchronousFileChannel} into a read-once {@code Flux} - * of {@code DataBuffer}s, starting at the given position. Closes the channel when the flux is - * terminated. - *

The resulting {@code Flux} can only be subscribed to once. See - * {@link #readAsynchronousFileChannel(Callable, long, DataBufferFactory, int)} for a variant - * that supports multiple subscriptions. - * @param channel the channel to read from - * @param position the position to start reading from - * @param dataBufferFactory the factory to create data buffers with - * @param bufferSize the maximum size of the data buffers - * @return a flux of data buffers read from the given channel - * @deprecated as of Spring 5.0.3, in favor of - * {@link #readAsynchronousFileChannel(Callable, long, DataBufferFactory, int)}, to be removed - * in Spring 5.1 - */ - @Deprecated - public static Flux read( - AsynchronousFileChannel channel, long position, DataBufferFactory dataBufferFactory, int bufferSize) { - - return readAsynchronousFileChannel(() -> channel, position, dataBufferFactory, bufferSize); - } - /** * Obtain a {@code AsynchronousFileChannel} from the given supplier, and read it into a * {@code Flux} of {@code DataBuffer}s. Closes the channel when the flux is terminated.