Package org.salespointframework.storage
Interface NamedBinary
public interface NamedBinary
An abstraction for files originating from different sources.
- Since:
- 7.5
- Author:
- Oliver Drotbohm
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThe actual file content.getName()
The name of the file to be stored.static NamedBinary
Creates a newNamedBinary
for the givenPath
.static NamedBinary
Creates a newNamedBinary
for the givenResource
.static NamedBinary
of
(MultipartFile file) Creates a newNamedBinary
for the givenMultipartFile
.
-
Method Details
-
getName
String getName()The name of the file to be stored.- Returns:
- will never be null or empty.
-
getInputStream
The actual file content.- Returns:
- will never be null.
- Throws:
IOException
-
of
Creates a newNamedBinary
for the givenPath
.- Parameters:
path
- must not be null.- Returns:
- will never be null.
-
of
Creates a newNamedBinary
for the givenResource
.- Parameters:
resource
- must not be null.- Returns:
- will never be null.
-
of
Creates a newNamedBinary
for the givenMultipartFile
.- Parameters:
file
- must not be null.- Returns:
- will never be null.
-