Package org.opendaylight.raft.spi
Interface SizedStreamSource
- All Superinterfaces:
StreamSource
- All Known Implementing Classes:
AbstractFileStreamSource
,ByteArray
,FileStreamSource
,TransientFileStreamSource
An
StreamSource
which knows its size. Essentially the moral equivalent of Guava's ByteSource
.-
Method Summary
Modifier and TypeMethodDescriptionlong
size()
Returns the size of this data source, which is to say the number of bytes available for reading from the stream returned byStreamSource.openStream()
.default SizedStreamSource
Return theSizedStreamSource
equivalent of thisStreamSource
.Methods inherited from interface org.opendaylight.raft.spi.StreamSource
openBufferedStream, openDataInput, openStream
-
Method Details
-
size
long size()Returns the size of this data source, which is to say the number of bytes available for reading from the stream returned byStreamSource.openStream()
.- Returns:
- the size of this data source
-
toSizedStreamSource
Description copied from interface:StreamSource
Return theSizedStreamSource
equivalent of thisStreamSource
.- Specified by:
toSizedStreamSource
in interfaceStreamSource
- Returns:
- the
SizedStreamSource
equivalent of thisStreamSource
-