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 NamedBinaryCreates a newNamedBinaryfor the givenPath.static NamedBinaryCreates a newNamedBinaryfor the givenResource.static NamedBinaryof(MultipartFile file) Creates a newNamedBinaryfor 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 newNamedBinaryfor the givenPath.- Parameters:
path- must not be null.- Returns:
- will never be null.
-
of
Creates a newNamedBinaryfor the givenResource.- Parameters:
resource- must not be null.- Returns:
- will never be null.
-
of
Creates a newNamedBinaryfor the givenMultipartFile.- Parameters:
file- must not be null.- Returns:
- will never be null.
-