Package org.cryptomator.cryptofs.fh
Interface ByteSource
-
- All Known Implementing Classes:
ByteSource.ByteBufferByteSource,ByteSource.UndefinedNoisePrefixedByteSource
public interface ByteSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classByteSource.ByteBufferByteSourcestatic classByteSource.UndefinedNoisePrefixedByteSourcestatic interfaceByteSource.UndefinedNoisePrefixedByteSourceWithoutBuffer
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcopyTo(ByteBuffer buffer)Copies as many bytes as possible from thisByteSourceto the givenByteBuffer.static ByteSourcefrom(ByteBuffer buffer)booleanhasRemaining()longremaining()static ByteSource.UndefinedNoisePrefixedByteSourceWithoutBufferundefinedNoise(long numBytes)
-
-
-
Method Detail
-
from
static ByteSource from(ByteBuffer buffer)
-
undefinedNoise
static ByteSource.UndefinedNoisePrefixedByteSourceWithoutBuffer undefinedNoise(long numBytes)
-
hasRemaining
boolean hasRemaining()
-
remaining
long remaining()
-
copyTo
void copyTo(ByteBuffer buffer)
Copies as many bytes as possible from this
ByteSourceto the givenByteBuffer.That means after this operation either
Buffer.remaining()orremaining()or both will return zero.- Parameters:
buffer- the byte buffer to copy bytes to.
-
-