public class LShrinkArray extends LImport
Constructor and Description |
---|
LShrinkArray(byte[] in)
Wraps bytes in a ShrinkArray.
|
LShrinkArray(java.nio.ByteBuffer array_)
Wraps ByteBuffer in a ShrinkArray.
|
LShrinkArray(java.io.File f)
Loads in a file as raw data and wraps it in a ShrinkArray.
|
LShrinkArray(LImport rhs,
int high)
Creates a new ShrinkArray based on the same underlying array, starting at
the same beginning index of the rhs LImport, but with an upper limit
of high.
|
LShrinkArray(LShrinkArray rhs) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
byte[] |
extract(int amount)
Extracts specified number of bytes.
|
byte[] |
extractUntil(int delimiter)
Extracts bytes until the delemiter is read.
Bumps the lower bound up so that following extracts do not extract the same data. |
byte[] |
extractUntil(java.lang.String delimiter) |
java.lang.Boolean |
isDone() |
void |
jumpBack(int amount)
Bumps the lower bound back to include bytes previously read/skipped or
outside the current bounds.
|
long |
pos() |
void |
pos(long pos) |
void |
skip(int skip)
Bumps the lower bound up to "skip" that many bytes.
|
java.lang.String |
toString() |
correctForCompression, extract, extractAllBytes, extractAllString, extractBool, extractFloat, extractInt, extractInt, extractInts, extractInts, extractLine, extractLong, extractString, extractString, extractString, extractUntil, extractUntil, extractUntil, extractUntil, getAllBytes, getBytes, getInts, getString, getString, read, scanTo
public LShrinkArray(byte[] in)
in
- public LShrinkArray(java.nio.ByteBuffer array_)
array_
- public LShrinkArray(LImport rhs, int high)
rhs
- LImport to copy bounds from.high
- New upper limit to give to the ShrinkArray.public LShrinkArray(LShrinkArray rhs)
rhs
- public LShrinkArray(java.io.File f) throws java.io.FileNotFoundException, java.io.IOException
f
- File to load in.java.io.FileNotFoundException
java.io.IOException
public java.lang.Boolean isDone()
public final int available()
public final void skip(int skip)
public void jumpBack(int amount)
public byte[] extractUntil(int delimiter)
extractUntil
in class LImport
delimiter
- Integer at which to stop reading.public byte[] extractUntil(java.lang.String delimiter)
delimiter
- public byte[] extract(int amount)
public java.lang.String toString()
toString
in class java.lang.Object