|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.mdr.persistence.btreeimpl.btreeindex.EntryTypeInfo
org.netbeans.mdr.persistence.btreeimpl.btreeindex.IntInfo
public class IntInfo
EntryTypeInfo implementation for integer data.
Constructor Summary | |
---|---|
IntInfo()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.netbeans.mdr.persistence.btreeimpl.btreeindex.EntryTypeInfo |
---|
getEntryTypeInfo, objectFromBuffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntInfo()
Method Detail |
---|
public java.lang.String typeName()
EntryTypeInfo
typeName
in class EntryTypeInfo
public byte[] toBuffer(java.lang.Object i)
toBuffer
in class EntryTypeInfo
i
- Integer to be stored
public java.lang.Object fromBuffer(byte[] buffer)
fromBuffer
in class EntryTypeInfo
buffer
- byte array containing an integer
public int fromBuffer(byte[] buffer, int offset)
public byte compare(byte[] key1Buffer, byte[] key2Buffer, int offset, int length)
compare
in class EntryTypeInfo
key1Buffer
- byte array containing integer search keykey2Buffer
- byte array containing integer target keyoffset
- offset into key2Buffer of target keylength
- should always be 4
EQUAL 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 EntryTypeInfo
public boolean isFixedLength()
EntryTypeInfo
isFixedLength
in class EntryTypeInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |