public class FileByteIterable extends java.lang.Object implements ByteIterable
getBytesUnsafe() as it
unconditionally throws UnsupportedOperationException.
Avoid using this class with Android API level less than 26.EMPTY, EMPTY_BYTES, EMPTY_ITERATOR| Constructor and Description |
|---|
FileByteIterable(@NotNull java.io.File file) |
FileByteIterable(@NotNull java.io.File file,
long offset,
int len) |
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
asStream() |
int |
compareTo(@NotNull ByteIterable right) |
byte[] |
getBytesUnsafe() |
int |
getLength() |
ByteIterator |
iterator() |
@NotNull ByteIterable |
subIterable(int offset,
int length) |
public FileByteIterable(@NotNull
@NotNull java.io.File file)
public FileByteIterable(@NotNull
@NotNull java.io.File file,
long offset,
int len)
public ByteIterator iterator()
iterator in interface ByteIterablepublic byte[] getBytesUnsafe()
getBytesUnsafe in interface ByteIterableUnsupportedOperationException.java.lang.UnsupportedOperationException - always since this operation is unsupportedpublic int getLength()
getLength in interface ByteIterableByteIterable.@NotNull public @NotNull ByteIterable subIterable(int offset, int length)
subIterable in interface ByteIterableoffset - start offset, inclusivelength - length of the sub-iterableByteIterable starting from offset.public int compareTo(@NotNull
@NotNull ByteIterable right)
compareTo in interface java.lang.Comparable<ByteIterable>public java.io.InputStream asStream()
throws java.io.IOException
java.io.IOException