public class BlockByteReader extends Object implements Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
BlockByteReader() |
|
BlockByteReader(List blokz,
int len) |
| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
allocate(int arg0) |
static ByteBuffer |
allocateDirect(int arg0) |
byte[] |
array() |
int |
arrayOffset() |
CharBuffer |
asCharBuffer() |
DoubleBuffer |
asDoubleBuffer() |
FloatBuffer |
asFloatBuffer() |
IntBuffer |
asIntBuffer() |
LongBuffer |
asLongBuffer() |
ByteBuffer |
asReadOnlyBuffer() |
ShortBuffer |
asShortBuffer() |
int |
capacity() |
Buffer |
clear() |
ByteBuffer |
compact() |
ByteBuffer |
duplicate() |
boolean |
equals(Object arg0) |
Buffer |
flip() |
byte |
get() |
byte |
get(BlockByteConsumer rec,
int startpos) |
byte[] |
get(BlockByteConsumer rec,
int startpos,
int len) |
ByteBuffer |
get(byte[] arg0) |
ByteBuffer |
get(byte[] arg0,
int arg1,
int arg2) |
boolean |
getApplyRelativePosition() |
ByteBuffer |
getBackingByteBuffer() |
List |
getBlockmap()
For whatever reason, get the blockmap
|
char |
getChar() |
char |
getChar(int arg0) |
double |
getDouble() |
double |
getDouble(int arg0) |
int[] |
getFileOffsets(int start,
int size)
Gets the mapping from stream offsets to file offsets over the given
range.
|
String |
getFileOffsetString(int start,
int size) |
float |
getFloat() |
float |
getFloat(int arg0) |
byte[] |
getHeaderBytes(int startpos)
Allows for getting of header bytes without setting blocks on a rec
|
int |
getInt() |
int |
getInt(int arg0) |
int |
getLength() |
long |
getLong() |
long |
getLong(int arg0) |
int[] |
getReadPositions(int startpos,
int len)
Gets the list of blocks needed to read the given sequence.
|
static int[] |
getReadPositions(int startpos,
int len,
boolean BIGBLOCKSTORAGE)
returns the lengths of the two byte
|
short |
getShort() |
short |
getShort(int arg0) |
boolean |
hasArray() |
int |
hashCode() |
boolean |
hasRemaining() |
boolean |
isDirect() |
boolean |
isReadOnly() |
int |
limit() |
Buffer |
limit(int arg0) |
Buffer |
mark() |
ByteOrder |
order() |
ByteBuffer |
order(ByteOrder arg0) |
int |
position() |
Buffer |
position(int arg0) |
ByteBuffer |
put(byte arg0) |
ByteBuffer |
put(byte[] arg0) |
ByteBuffer |
put(byte[] arg0,
int arg1,
int arg2) |
ByteBuffer |
put(ByteBuffer arg0) |
ByteBuffer |
put(int arg0,
byte arg1) |
ByteBuffer |
putChar(char arg0) |
ByteBuffer |
putChar(int arg0,
char arg1) |
ByteBuffer |
putDouble(double arg0) |
ByteBuffer |
putDouble(int arg0,
double arg1) |
ByteBuffer |
putFloat(float arg0) |
ByteBuffer |
putFloat(int arg0,
float arg1) |
ByteBuffer |
putInt(int arg0) |
ByteBuffer |
putInt(int arg0,
int arg1) |
ByteBuffer |
putLong(int arg0,
long arg1) |
ByteBuffer |
putLong(long arg0) |
ByteBuffer |
putShort(int arg0,
short arg1) |
ByteBuffer |
putShort(short arg0) |
int |
remaining() |
Buffer |
reset() |
Buffer |
rewind() |
void |
setApplyRelativePosition(boolean b)
Only add the offset when we are fetching
data from 'within' a record, ie: rkdata.get(i)
as opposed to when we are traversing the entire collection
of bytes as in WorkBookFactory.parse()...
|
void |
setBackingByteBuffer(ByteBuffer buffer) |
void |
setBlockmap(AbstractList list)
Set the map of Blocks contained in this reader
|
void |
setLength(int i) |
ByteBuffer |
slice() |
String |
toString() |
static ByteBuffer |
wrap(byte[] arg0) |
static ByteBuffer |
wrap(byte[] arg0,
int arg1,
int arg2) |
protected BlockByteReader()
public BlockByteReader(List blokz, int len)
public boolean isReadOnly()
public byte[] getHeaderBytes(int startpos)
startpos - public byte get(BlockByteConsumer rec, int startpos)
public byte[] get(BlockByteConsumer rec, int startpos, int len)
public static int[] getReadPositions(int startpos,
int len,
boolean BIGBLOCKSTORAGE)
ie: start 10 len 8 blk0 = 10-18 0,10,18 ie: start 514 len 1 blk1 = 2-3 1,2,3 ie: start 480 len 1124 blk0 = 480-512 blk1 = 512-1024 blk2 = 1024-1536 blk3 = 1536-1604 [0, 480, 512,1, 0, 512, 2, 0, 512, 3, 0, 68] 8139, 693
startpos - public int[] getReadPositions(int startpos,
int len)
public int[] getFileOffsets(int start,
int size)
start and the second is the
corresponding offset in the source file.public String getFileOffsetString(int start, int size)
public List getBlockmap()
public void setBlockmap(AbstractList list)
list - the map of blockspublic int getLength()
public void setLength(int i)
i - public static ByteBuffer allocate(int arg0)
arg0 - public static ByteBuffer allocateDirect(int arg0)
arg0 - public static final ByteBuffer wrap(byte[] arg0)
arg0 - public static final ByteBuffer wrap(byte[] arg0, int arg1, int arg2)
arg0 - arg1 - arg2 - public byte[] array()
public int arrayOffset()
public CharBuffer asCharBuffer()
public DoubleBuffer asDoubleBuffer()
public FloatBuffer asFloatBuffer()
public IntBuffer asIntBuffer()
public LongBuffer asLongBuffer()
public ByteBuffer asReadOnlyBuffer()
public ShortBuffer asShortBuffer()
public int capacity()
public Buffer clear()
public ByteBuffer compact()
public ByteBuffer duplicate()
public Buffer flip()
public byte get()
public ByteBuffer get(byte[] arg0)
arg0 - public ByteBuffer get(byte[] arg0, int arg1, int arg2)
arg0 - arg1 - arg2 - public char getChar()
public char getChar(int arg0)
arg0 - public double getDouble()
public double getDouble(int arg0)
arg0 - public float getFloat()
public float getFloat(int arg0)
arg0 - public int getInt()
public int getInt(int arg0)
arg0 - public long getLong()
public long getLong(int arg0)
arg0 - public short getShort()
public short getShort(int arg0)
arg0 - public boolean hasArray()
public boolean hasRemaining()
public boolean isDirect()
public int limit()
public Buffer limit(int arg0)
arg0 - public Buffer mark()
public ByteOrder order()
public ByteBuffer order(ByteOrder arg0)
arg0 - public int position()
public Buffer position(int arg0)
arg0 - public ByteBuffer put(byte arg0)
arg0 - public ByteBuffer put(byte[] arg0)
arg0 - public ByteBuffer put(byte[] arg0, int arg1, int arg2)
arg0 - arg1 - arg2 - public ByteBuffer put(int arg0, byte arg1)
arg0 - arg1 - public ByteBuffer put(ByteBuffer arg0)
arg0 - public ByteBuffer putChar(char arg0)
arg0 - public ByteBuffer putChar(int arg0, char arg1)
arg0 - arg1 - public ByteBuffer putDouble(double arg0)
arg0 - public ByteBuffer putDouble(int arg0, double arg1)
arg0 - arg1 - public ByteBuffer putFloat(float arg0)
arg0 - public ByteBuffer putFloat(int arg0, float arg1)
arg0 - arg1 - public ByteBuffer putInt(int arg0)
arg0 - public ByteBuffer putInt(int arg0, int arg1)
arg0 - arg1 - public ByteBuffer putLong(int arg0, long arg1)
arg0 - arg1 - public ByteBuffer putLong(long arg0)
arg0 - public ByteBuffer putShort(int arg0, short arg1)
arg0 - arg1 - public ByteBuffer putShort(short arg0)
arg0 - public int remaining()
public Buffer reset()
public Buffer rewind()
public ByteBuffer slice()
public ByteBuffer getBackingByteBuffer()
public void setBackingByteBuffer(ByteBuffer buffer)
buffer - public boolean getApplyRelativePosition()
public void setApplyRelativePosition(boolean b)
Copyright © 2002–2019 Starter Inc.. All rights reserved.