From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/java/com/sleepycat/util/PackedInteger.html | 1298 +++++++++++------------ 1 file changed, 621 insertions(+), 677 deletions(-) (limited to 'docs/java/com/sleepycat/util/PackedInteger.html') diff --git a/docs/java/com/sleepycat/util/PackedInteger.html b/docs/java/com/sleepycat/util/PackedInteger.html index ade25581..e561d13c 100644 --- a/docs/java/com/sleepycat/util/PackedInteger.html +++ b/docs/java/com/sleepycat/util/PackedInteger.html @@ -1,713 +1,657 @@ - - - - - -PackedInteger (Oracle - Berkeley DB Java API) - - - - - - - - - - - - -
- - +//--> + + - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-

- -com.sleepycat.util -
-Class PackedInteger

-
-java.lang.Object
-  extended by com.sleepycat.util.PackedInteger
-
-
-
-
public class PackedInteger
extends Object
- - -

-Static methods for reading and writing packed integers. - -

Most applications should use the classes in the com.sleepycat.bind.tuple package rather than using this class directly.

-

- -

-

-
See Also:
Integer Formats
-
- -

+

+
com.sleepycat.util
+

Class PackedInteger

+
+
+ +
+
    +
  • +
    +
    +
    public class PackedInteger
    +extends java.lang.Object
    +
    Static methods for reading and writing packed integers. + +

    Most applications should use the classes in the com.sleepycat.bind.tuple package rather than using this class directly.

    +
    See Also:
    Integer Formats
    +
  • +
+
+
+
    +
  • - - - - - - - - - - - - - - -
    -Field Summary
    -static intMAX_LENGTH - -
    -          The maximum number of bytes needed to store an int value (5).
    -static intMAX_LONG_LENGTH - -
    -          The maximum number of bytes needed to store a long value (9).
    -  +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static intMAX_LENGTH +
      The maximum number of bytes needed to store an int value (5).
      +
      static intMAX_LONG_LENGTH +
      The maximum number of bytes needed to store a long value (9).
      +
      +
    • +
    - - - - - - - - - -
    -Constructor Summary
    PackedInteger() - -
    -           
    -  +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      PackedInteger() 
      +
    • +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    -Method Summary
    -static intgetReadIntLength(byte[] buf, - int off) - -
    -          Returns the number of bytes that would be read by readInt(byte[], int).
    -static intgetReadLongLength(byte[] buf, - int off) - -
    -          Returns the number of bytes that would be read by readLong(byte[], int).
    -static intgetReadSortedIntLength(byte[] buf, - int off) - -
    -          Returns the number of bytes that would be read by readSortedInt(byte[], int).
    -static intgetReadSortedLongLength(byte[] buf, - int off) - -
    -          Returns the number of bytes that would be read by readSortedLong(byte[], int).
    -static intgetWriteIntLength(int value) - -
    -          Returns the number of bytes that would be written by writeInt(byte[], int, int).
    -static intgetWriteLongLength(long value) - -
    -          Returns the number of bytes that would be written by writeLong(byte[], int, long).
    -static intgetWriteSortedIntLength(int value) - -
    -          Returns the number of bytes that would be written by writeSortedInt(byte[], int, int).
    -static intgetWriteSortedLongLength(long value) - -
    -          Returns the number of bytes that would be written by writeSortedLong(byte[], int, long).
    -static intreadInt(byte[] buf, - int off) - -
    -          Reads a packed integer at the given buffer offset and returns it.
    -static longreadLong(byte[] buf, - int off) - -
    -          Reads a packed long integer at the given buffer offset and returns it.
    -static intreadSortedInt(byte[] buf, - int off) - -
    -          Reads a sorted packed integer at the given buffer offset and returns it.
    -static longreadSortedLong(byte[] buf, - int off) - -
    -          Reads a sorted packed long integer at the given buffer offset and - returns it.
    -static intwriteInt(byte[] buf, +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      static intgetReadIntLength(byte[] buf, + int off) +
      Returns the number of bytes that would be read by readInt(byte[], int).
      +
      static intgetReadLongLength(byte[] buf, + int off) +
      Returns the number of bytes that would be read by readLong(byte[], int).
      +
      static intgetReadSortedIntLength(byte[] buf, + int off) +
      Returns the number of bytes that would be read by readSortedInt(byte[], int).
      +
      static intgetReadSortedLongLength(byte[] buf, + int off) +
      Returns the number of bytes that would be read by readSortedLong(byte[], int).
      +
      static intgetWriteIntLength(int value) +
      Returns the number of bytes that would be written by writeInt(byte[], int, int).
      +
      static intgetWriteLongLength(long value) +
      Returns the number of bytes that would be written by writeLong(byte[], int, long).
      +
      static intgetWriteSortedIntLength(int value) +
      Returns the number of bytes that would be written by writeSortedInt(byte[], int, int).
      +
      static intgetWriteSortedLongLength(long value) +
      Returns the number of bytes that would be written by writeSortedLong(byte[], int, long).
      +
      static intreadInt(byte[] buf, + int off) +
      Reads a packed integer at the given buffer offset and returns it.
      +
      static longreadLong(byte[] buf, + int off) +
      Reads a packed long integer at the given buffer offset and returns it.
      +
      static intreadSortedInt(byte[] buf, + int off) +
      Reads a sorted packed integer at the given buffer offset and returns it.
      +
      static longreadSortedLong(byte[] buf, + int off) +
      Reads a sorted packed long integer at the given buffer offset and + returns it.
      +
      static intwriteInt(byte[] buf, + int offset, + int value) +
      Writes a packed integer starting at the given buffer offset and returns + the next offset to be written.
      +
      static intwriteLong(byte[] buf, int offset, - int value) - -
      -          Writes a packed integer starting at the given buffer offset and returns - the next offset to be written.
      -static intwriteLong(byte[] buf, - int offset, - long value) - -
      -          Writes a packed long integer starting at the given buffer offset and - returns the next offset to be written.
      -static intwriteSortedInt(byte[] buf, + long value) +
      Writes a packed long integer starting at the given buffer offset and + returns the next offset to be written.
      +
      static intwriteSortedInt(byte[] buf, + int offset, + int value) +
      Writes a packed sorted integer starting at the given buffer offset and + returns the next offset to be written.
      +
      static intwriteSortedLong(byte[] buf, int offset, - int value) - -
      -          Writes a packed sorted integer starting at the given buffer offset and - returns the next offset to be written.
      -static intwriteSortedLong(byte[] buf, - int offset, - long value) - -
      -          Writes a packed sorted long integer starting at the given buffer offset - and returns the next offset to be written.
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - + long value) +

      Writes a packed sorted long integer starting at the given buffer offset + and returns the next offset to be written.
      +
    +
      +
    • + + +

      Methods inherited from class java.lang.Object

      +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • +
    +
  • +
+ + +
+
+
    +
  • - - - - - - -
    -Field Detail
    - -

    -MAX_LENGTH

    -
    -public static final int MAX_LENGTH
    -
    -
    The maximum number of bytes needed to store an int value (5). -

    -

    -
    See Also:
    Constant Field Values
    -
    -
    - -

    -MAX_LONG_LENGTH

    -
    -public static final int MAX_LONG_LENGTH
    -
    -
    The maximum number of bytes needed to store a long value (9). -

    -

    -
    See Also:
    Constant Field Values
    -
    - +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        MAX_LENGTH

        +
        public static final int MAX_LENGTH
        +
        The maximum number of bytes needed to store an int value (5).
        +
        See Also:
        Constant Field Values
        +
      • +
      + + + +
        +
      • +

        MAX_LONG_LENGTH

        +
        public static final int MAX_LONG_LENGTH
        +
        The maximum number of bytes needed to store a long value (9).
        +
        See Also:
        Constant Field Values
        +
      • +
      +
    • +
    - - - - - - -
    -Constructor Detail
    - -

    -PackedInteger

    -
    -public PackedInteger()
    -
    -
    - +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PackedInteger

        +
        public PackedInteger()
        +
      • +
      +
    • +
    - - - - - - -
    -Method Detail
    - -

    -readInt

    -
    -public static int readInt(byte[] buf,
    -                          int off)
    -
    -
    Reads a packed integer at the given buffer offset and returns it. -

    -

    -
    Parameters:
    buf - the buffer to read from.
    off - the offset in the buffer at which to start reading. -
    Returns:
    the integer that was read.
    -
    -
    -
    - -

    -readLong

    -
    -public static long readLong(byte[] buf,
    -                            int off)
    -
    -
    Reads a packed long integer at the given buffer offset and returns it. -

    -

    -
    Parameters:
    buf - the buffer to read from.
    off - the offset in the buffer at which to start reading. -
    Returns:
    the long integer that was read.
    -
    -
    -
    - -

    -getReadIntLength

    -
    -public static int getReadIntLength(byte[] buf,
    -                                   int off)
    -
    -
    Returns the number of bytes that would be read by readInt(byte[], int). +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        readInt

        +
        public static int readInt(byte[] buf,
        +          int off)
        +
        Reads a packed integer at the given buffer offset and returns it.
        +
        Parameters:
        buf - the buffer to read from.
        off - the offset in the buffer at which to start reading.
        +
        Returns:
        the integer that was read.
        +
      • +
      + + + +
        +
      • +

        readLong

        +
        public static long readLong(byte[] buf,
        +            int off)
        +
        Reads a packed long integer at the given buffer offset and returns it.
        +
        Parameters:
        buf - the buffer to read from.
        off - the offset in the buffer at which to start reading.
        +
        Returns:
        the long integer that was read.
        +
      • +
      + + + +
        +
      • +

        getReadIntLength

        +
        public static int getReadIntLength(byte[] buf,
        +                   int off)
        +
        Returns the number of bytes that would be read by readInt(byte[], int).

        Because the length is stored in the first byte, this method may be called with only the first byte of the packed integer in the given - buffer. This method only accesses one byte at the given offset.

        -

        -

        -
        Parameters:
        buf - the buffer to read from.
        off - the offset in the buffer at which to start reading. -
        Returns:
        the number of bytes that would be read.
        -
        -
    -
    - -

    -getReadLongLength

    -
    -public static int getReadLongLength(byte[] buf,
    -                                    int off)
    -
    -
    Returns the number of bytes that would be read by readLong(byte[], int). + buffer. This method only accesses one byte at the given offset.

+
Parameters:
buf - the buffer to read from.
off - the offset in the buffer at which to start reading.
+
Returns:
the number of bytes that would be read.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ -
- - - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved. - - +

Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.

+ + -- cgit v1.2.1