spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/io/Content.java
/**
	 * Create a new {@link Content} from the given input stream. The stream will be closed
	 * after it has been written.
	 * @param size the size of the supplied input stream
	 * @param supplier the input stream supplier
	 * @return a new {@link Content} instance
	 */
Create a new  Content from the given input stream. The stream will be closed
after it has been written.
@param size the size of the supplied input stream
@param supplier the input stream supplier
@return a new  Content instance
Create a new Content from the given input stream . The stream will be closed after it has been written . @param size the size of the supplied input stream @param supplier the input stream supplier @return a new Content instance
static Content of(int size, IOSupplier<InputStream> supplier) {
		Assert.isTrue(size >= 0, "Size must not be negative");
		Assert.notNull(supplier, "Supplier must not be null");
		return new Content() {
			@Override
			public int size() {
				return size;
			}
			@Override
			public void writeTo(OutputStream outputStream) throws IOException {
				FileCopyUtils.copy(supplier.get(), outputStream);
			}
		};
	}
static Content of ( int size , IOSupplier < InputStream > supplier ) { Assert . isTrue ( size >= 0 , "Size must not be negative" ) ; Assert . notNull ( supplier , "Supplier must not be null" ) ; return new Content ( ) { @ Override public int size ( ) { return size ; } @ Override public void writeTo ( OutputStream outputStream ) throws IOException { FileCopyUtils . copy ( supplier . get ( ) , outputStream ) ; } } ; }
Create a new {@link Content} from the given input stream.
Create a new { @link Content } from the given input stream .