Interface SizedDataSource
- All Superinterfaces:
jakarta.activation.DataSource
public interface SizedDataSource
extends jakarta.activation.DataSource
An extension of the
jakarta.activation.DataSource
that
provides the size information of the binary input stream.- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionlong
getSize()
Returns the number of bytes that can be retrieved bygetInputStream()
The method can be called more than once.Methods inherited from interface jakarta.activation.DataSource
getContentType, getInputStream, getName, getOutputStream
-
Method Details
-
getSize
long getSize()Returns the number of bytes that can be retrieved bygetInputStream()
The method can be called more than once. A return value less than 0 will be interpreted as unknown size.- Returns:
- the size of the input stream in bytes
- Since:
- 3.0
-