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 TypeMethodDescriptionlongsize()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 SizedStreamSourceReturn theSizedStreamSourceequivalent 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:StreamSourceReturn theSizedStreamSourceequivalent of thisStreamSource.- Specified by:
toSizedStreamSourcein interfaceStreamSource- Returns:
- the
SizedStreamSourceequivalent of thisStreamSource
-