public class ArraySlice extends Slice
| Modifier and Type | Field and Description |
|---|---|
byte[] |
arr
The wrapped byte array.
|
inflatedLengthHint, isDeflatedZipEntry, nestedJarHandler, parentSlice, sliceLength, sliceStartPos| Constructor and Description |
|---|
ArraySlice(byte[] arr,
boolean isDeflatedZipEntry,
long inflatedLengthHint,
NestedJarHandler nestedJarHandler)
Constructor for treating a whole array as a slice.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
byte[] |
load()
Load the slice as a byte array.
|
RandomAccessReader |
randomAccessReader()
Return a new random access reader.
|
Slice |
slice(long offset,
long length,
boolean isDeflatedZipEntry,
long inflatedLengthHint)
Slice this slice to form a sub-slice.
|
public ArraySlice(byte[] arr,
boolean isDeflatedZipEntry,
long inflatedLengthHint,
NestedJarHandler nestedJarHandler)
arr - the array containing the slice.isDeflatedZipEntry - true if this is a deflated zip entryinflatedLengthHint - the uncompressed size of a deflated zip entry, or -1 if unknown, or 0 of this is not a deflated
zip entry.nestedJarHandler - the nested jar handlerpublic Slice slice(long offset, long length, boolean isDeflatedZipEntry, long inflatedLengthHint)
slice in class Sliceoffset - the offset relative to the start of this slice to use as the start of the sub-slice.length - the length of the sub-slice.isDeflatedZipEntry - the is deflated zip entryinflatedLengthHint - the uncompressed size of a deflated zip entry, or -1 if unknown, or 0 of this is not a deflated
zip entry.public byte[] load()
throws java.io.IOException
public RandomAccessReader randomAccessReader()
randomAccessReader in class Slice