Top Description Inners Fields Constructors Methods
org.springframework.http.codec.multipart

pack-priv abstract Class FileStorage

extends Object
Class Inheritance
Known Direct Subclasses
org.springframework.http.codec.multipart.FileStorage.PathFileStorage, org.springframework.http.codec.multipart.FileStorage.TempFileStorage
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.function.Supplier, org.apache.commons.logging.Log, .LogFactory, reactor.core.publisher.Mono, reactor.core.scheduler.Scheduler

Represents a directory used to store parts larger than DefaultPartHttpMessageReader#setMaxInMemorySize(int).
Author
Arjen Poutsma
Since
5.3.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final Log

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public abstract Mono<Path>
directory()

Get the mono of the directory to store files in.

public static FileStorage
fromPath(Path path)

Create a new FileStorage from a user-specified path.

public static FileStorage
tempDirectory(Supplier<Scheduler>
the scheduler to use for blocking operations
scheduler
)

Create a new FileStorage based on a temporary directory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loggerback to summary
private static final Log logger

Constructor Detail

FileStorageback to summary
protected FileStorage()

Method Detail

directoryback to summary
public abstract Mono<Path> directory()

Get the mono of the directory to store files in.

fromPathback to summary
public static FileStorage fromPath(Path path) throws IOException

Create a new FileStorage from a user-specified path. Creates the path if it does not exist.

tempDirectoryback to summary
public static FileStorage tempDirectory(Supplier<Scheduler> scheduler)

Create a new FileStorage based on a temporary directory.

Parameters
scheduler:Supplier<Scheduler>

the scheduler to use for blocking operations

org.springframework.http.codec.multipart back to summary

private final Class FileStorage.PathFileStorage

extends FileStorage
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Mono<Path>

Constructor Summary

AccessConstructor and Description
public
PathFileStorage(Path directory)

Method Summary

Modifier and TypeMethod and Description
public Mono<Path>
directory()

Implements abstract org.springframework.http.codec.multipart.FileStorage.directory.

Get the mono of the directory to store files in.
Inherited from org.springframework.http.codec.multipart.FileStorage:
fromPathtempDirectory

Field Detail

directoryback to summary
private final Mono<Path> directory

Constructor Detail

PathFileStorageback to summary
public PathFileStorage(Path directory)

Method Detail

directoryback to summary
public Mono<Path> directory()

Implements abstract org.springframework.http.codec.multipart.FileStorage.directory.

Doc from org.springframework.http.codec.multipart.FileStorage.directory.

Get the mono of the directory to store files in.

Annotations
@Override
org.springframework.http.codec.multipart back to summary

private final Class FileStorage.TempFileStorage

extends FileStorage
Class Inheritance

Field Summary

Modifier and TypeField and Description
private volatile Mono<Path>
private static final String
private final Supplier<Scheduler>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Mono<Path>
public Mono<Path>
directory()

Implements abstract org.springframework.http.codec.multipart.FileStorage.directory.

Get the mono of the directory to store files in.
private static Mono<Path>
Inherited from org.springframework.http.codec.multipart.FileStorage:
fromPathtempDirectory

Field Detail

directoryback to summary
private volatile Mono<Path> directory
IDENTIFIERback to summary
private static final String IDENTIFIER
schedulerback to summary
private final Supplier<Scheduler> scheduler

Constructor Detail

TempFileStorageback to summary
public TempFileStorage(Supplier<Scheduler> scheduler)

Method Detail

createNewDirectoryIfDeletedback to summary
private Mono<Path> createNewDirectoryIfDeleted(Path directory)
directoryback to summary
public Mono<Path> directory()

Implements abstract org.springframework.http.codec.multipart.FileStorage.directory.

Doc from org.springframework.http.codec.multipart.FileStorage.directory.

Get the mono of the directory to store files in.

Annotations
@Override
tempDirectoryback to summary
private static Mono<Path> tempDirectory()