Berkeley DB version 4.2.52

## com.sleepycat.bdb
Class RecordNumberFormat

    java.lang.Object
      |
      +--com.sleepycat.bdb.RecordNumberFormat

All Implemented Interfaces:
  DataFormat

public class RecordNumberFormat
extends Object
implements DataFormat

The data format for record number keys. This class must be used whenever a record number is used with a store, index, or binding. It is used to identify Berkeley DB record numbers as such and perform special processing required by Berkeley DB. Namely, the byte order of record numbers is not the same as the byte order for integers in Java, and is also platform dependent.

Constructor Summary
`RecordNumberFormat()` Creates a record number format.

Method Summary
`long` `dataToRecordNumber(DataBuffer data)` Utility method for use by bindings to translate a data buffer to an record number integer.
`boolean` `equals(Object o)` Test for equality.
`void` `recordNumberToData(long recordNumber, DataBuffer data)` Utility method for use by bindings to translate a record number integer to a data buffer.

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RecordNumberFormat

    public RecordNumberFormat()

  Creates a record number format.

Method Detail

### dataToRecordNumber

    public final long dataToRecordNumber(DataBuffer data)

  Utility method for use by bindings to translate a data buffer to an record number integer.

  Parameters:
    `data` - the data buffer.
  Returns:
    the record number.

### recordNumberToData

    public final void recordNumberToData(long recordNumber,
                                         DataBuffer data)

  Utility method for use by bindings to translate a record number integer to a data buffer.

  Parameters:
    `recordNumber` - the record number.
    `data` - the data buffer to hold the record number.

### equals

    public boolean equals(Object o)

  Test for equality.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `o` - the object to check.
  Returns:
    true if the given object is a RecordNumberFormat instance, since all RecordNumberFormat instances are equivalent.

Berkeley DB version 4.2.52

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.