public class SimpleBitIndexPointer extends Object implements BitIndexPointer, org.apache.hadoop.io.Writable
Modifier and Type | Class and Description |
---|---|
static class |
SimpleBitIndexPointer.Factory
Factory class for
SimpleBitIndexPointer . |
BIT_MASK, FILE_SHIFT, MAX_FILE_ID
Constructor and Description |
---|
SimpleBitIndexPointer()
Construct an instance of the class.
|
SimpleBitIndexPointer(byte fileId,
long byteOffset,
byte bitOffset,
int numEntries)
Construct an instance of the class with
|
SimpleBitIndexPointer(long byteOffset,
byte bitOffset,
int numEntries)
Construct an instance of the class with
|
Modifier and Type | Method and Description |
---|---|
byte |
getFileNumber()
Returns the file number: 0-32
|
int |
getNumberOfEntries()
Returns number of "things" that this pointer refers to
|
long |
getOffset()
Return the offset
|
byte |
getOffsetBits()
Return the offset bits
|
String |
pointerToString()
Returns a textual representation of the pointer alone
|
void |
readFields(DataInput arg0)
Populate this pointer from DataInput source
|
void |
setBitIndexPointer(BitIndexPointer pointer)
Update this pointer to reflect the same values as the specified
pointer
|
void |
setFileNumber(byte fileId)
Set the file number
|
void |
setNumberOfEntries(int count)
Set the number of "things that the pointer refers to
|
void |
setOffset(BitFilePosition pos)
Set the offset
|
void |
setOffset(long _bytes,
byte _bits)
Set the offset in bytes and bits
|
void |
setPointer(Pointer p)
Sets the pointer within this object to that represented by
the specified pointer
|
String |
toString()
Debug friendly output of this pointer
|
void |
write(DataOutput arg0)
Write this pointer to DataOutput
|
public SimpleBitIndexPointer()
public SimpleBitIndexPointer(byte fileId, long byteOffset, byte bitOffset, int numEntries)
fileId
- byteOffset
- bitOffset
- numEntries
- public SimpleBitIndexPointer(long byteOffset, byte bitOffset, int numEntries)
byteOffset
- bitOffset
- numEntries
- public int getNumberOfEntries()
getNumberOfEntries
in interface Pointer
public void setNumberOfEntries(int count)
setNumberOfEntries
in interface Pointer
public byte getOffsetBits()
getOffsetBits
in interface BitFilePosition
public byte getFileNumber()
getFileNumber
in interface BitIndexPointer
public void setFileNumber(byte fileId)
setFileNumber
in interface BitIndexPointer
public long getOffset()
getOffset
in interface BitFilePosition
public void setOffset(long _bytes, byte _bits)
setOffset
in interface BitFilePosition
public void setBitIndexPointer(BitIndexPointer pointer)
setBitIndexPointer
in interface BitIndexPointer
pointer
- - pointer to use to set the offset, bit offset
and file Id parameters.public void setOffset(BitFilePosition pos)
setOffset
in interface BitFilePosition
public void readFields(DataInput arg0) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput arg0) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public String toString()
public String pointerToString()
pointerToString
in interface Pointer
public void setPointer(Pointer p)
setPointer
in interface Pointer
p
- other pointer to update the pointer in this objectTerrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow