public class IntInfo extends EntryTypeInfo
| Constructor and Description |
|---|
IntInfo() |
| Modifier and Type | Method and Description |
|---|---|
byte |
compare(byte[] key1Buffer,
byte[] key2Buffer,
int offset,
int length)
Compares two integers stored in byte arrays
|
java.lang.Object |
fromBuffer(byte[] buffer)
Reads an integer from a byte array
|
int |
fromBuffer(byte[] buffer,
int offset)
Returns an int read from the 4 bytes starting at the location
passed in.
|
int |
getLength()
Returns the length of an integer
|
boolean |
isFixedLength()
Returns true if this is a fixed length type, otherwise returns false;
|
byte[] |
toBuffer(java.lang.Object i)
Store an integer in a byte array
|
java.lang.String |
typeName()
Returns the name of this type as a String.
|
getEntryTypeInfo, objectFromBufferpublic java.lang.String typeName()
EntryTypeInfotypeName in class EntryTypeInfopublic byte[] toBuffer(java.lang.Object i)
toBuffer in class EntryTypeInfoi - Integer to be storedpublic java.lang.Object fromBuffer(byte[] buffer)
fromBuffer in class EntryTypeInfobuffer - byte array containing an integerpublic int fromBuffer(byte[] buffer,
int offset)
public byte compare(byte[] key1Buffer,
byte[] key2Buffer,
int offset,
int length)
compare in class EntryTypeInfokey1Buffer - byte array containing integer search keykey2Buffer - byte array containing integer target keyoffset - offset into key2Buffer of target keylength - should always be 4EQUAL if the two keys are equal
GREATER if search key is greater than target key
LESS if search key is less than target key
public int getLength()
getLength in class EntryTypeInfopublic boolean isFixedLength()
EntryTypeInfoisFixedLength in class EntryTypeInfoCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.