From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- apidocs/com/amazon/carbonado/raw/KeyDecoder.html | 936 +++++++++++++++++++++++ 1 file changed, 936 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/raw/KeyDecoder.html (limited to 'apidocs/com/amazon/carbonado/raw/KeyDecoder.html') diff --git a/apidocs/com/amazon/carbonado/raw/KeyDecoder.html b/apidocs/com/amazon/carbonado/raw/KeyDecoder.html new file mode 100644 index 0000000..d46933a --- /dev/null +++ b/apidocs/com/amazon/carbonado/raw/KeyDecoder.html @@ -0,0 +1,936 @@ + + + + + + +KeyDecoder (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.raw
+

Class KeyDecoder

+
+
+ +
+
    +
  • +
    +
    +
    public class KeyDecoder
    +extends java.lang.Object
    +
    A very low-level class that decodes key components encoded by methods of + KeyEncoder.
    +
    Author:
    +
    Brian S O'Neill
    +
    See Also:
    DataDecoder
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      KeyDecoder() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      static intdecode(byte[] src, + int srcOffset, + java.math.BigDecimal[] valueRef) +
      Decodes the given BigDecimal as originally encoded for ascending order.
      +
      static intdecode(byte[] src, + int srcOffset, + java.math.BigInteger[] valueRef) +
      Decodes the given BigInteger as originally encoded for ascending order.
      +
      static intdecode(byte[] src, + int srcOffset, + byte[][] valueRef) +
      Decodes the given byte array as originally encoded for ascending order.
      +
      static booleandecodeBooleanDesc(byte[] src, + int srcOffset) +
      Decodes a boolean from exactly 1 byte, as encoded for descending order.
      +
      static java.lang.BooleandecodeBooleanObjDesc(byte[] src, + int srcOffset) +
      Decodes a Boolean object from exactly 1 byte, as encoded for descending + order.
      +
      static bytedecodeByteDesc(byte[] src, + int srcOffset) +
      Decodes a signed byte from exactly 1 byte, as encoded for descending + order.
      +
      static java.lang.BytedecodeByteObjDesc(byte[] src, + int srcOffset) +
      Decodes a signed Byte object from exactly 1 or 2 bytes, as encoded for + descending order.
      +
      static java.lang.CharacterdecodeCharacterObjDesc(byte[] src, + int srcOffset) +
      Decodes a Character object from exactly 1 or 3 bytes, as encoded for + descending order.
      +
      static chardecodeCharDesc(byte[] src, + int srcOffset) +
      Decodes a char from exactly 2 bytes, as encoded for descending order.
      +
      static intdecodeDesc(byte[] src, + int srcOffset, + java.math.BigDecimal[] valueRef) +
      Decodes the given BigDecimal as originally encoded for descending order.
      +
      static intdecodeDesc(byte[] src, + int srcOffset, + java.math.BigInteger[] valueRef) +
      Decodes the given BigInteger as originally encoded for descending order.
      +
      static intdecodeDesc(byte[] src, + int srcOffset, + byte[][] valueRef) +
      Decodes the given byte array as originally encoded for descending order.
      +
      static doubledecodeDoubleDesc(byte[] src, + int srcOffset) +
      Decodes a double from exactly 8 bytes, as encoded for descending order.
      +
      static java.lang.DoubledecodeDoubleObjDesc(byte[] src, + int srcOffset) +
      Decodes a Double object from exactly 8 bytes.
      +
      static floatdecodeFloatDesc(byte[] src, + int srcOffset) +
      Decodes a float from exactly 4 bytes, as encoded for descending order.
      +
      static java.lang.FloatdecodeFloatObjDesc(byte[] src, + int srcOffset) +
      Decodes a Float object from exactly 4 bytes.
      +
      static intdecodeIntDesc(byte[] src, + int srcOffset) +
      Decodes a signed integer from exactly 4 bytes, as encoded for descending + order.
      +
      static java.lang.IntegerdecodeIntegerObjDesc(byte[] src, + int srcOffset) +
      Decodes a signed Integer object from exactly 1 or 5 bytes, as encoded + for descending order.
      +
      static longdecodeLongDesc(byte[] src, + int srcOffset) +
      Decodes a signed long from exactly 8 bytes, as encoded for descending + order.
      +
      static java.lang.LongdecodeLongObjDesc(byte[] src, + int srcOffset) +
      Decodes a signed Long object from exactly 1 or 9 bytes, as encoded for + descending order.
      +
      static shortdecodeShortDesc(byte[] src, + int srcOffset) +
      Decodes a signed short from exactly 2 bytes, as encoded for descending + order.
      +
      static java.lang.ShortdecodeShortObjDesc(byte[] src, + int srcOffset) +
      Decodes a signed Short object from exactly 1 or 3 bytes, as encoded for + descending order.
      +
      static byte[]decodeSingleDesc(byte[] src) +
      Decodes the given byte array which was encoded by KeyEncoder.encodeSingleDesc(byte[]).
      +
      static byte[]decodeSingleDesc(byte[] src, + int prefixPadding, + int suffixPadding) +
      Decodes the given byte array which was encoded by KeyEncoder.encodeSingleDesc(byte[]).
      +
      static byte[]decodeSingleNullableDesc(byte[] src) +
      Decodes the given byte array which was encoded by KeyEncoder.encodeSingleNullableDesc(byte[]).
      +
      static byte[]decodeSingleNullableDesc(byte[] src, + int prefixPadding, + int suffixPadding) +
      Decodes the given byte array which was encoded by KeyEncoder.encodeSingleNullableDesc(byte[]).
      +
      static intdecodeString(byte[] src, + int srcOffset, + java.lang.String[] valueRef) +
      Decodes an encoded string from the given byte array.
      +
      static intdecodeStringDesc(byte[] src, + int srcOffset, + java.lang.String[] valueRef) +
      Decodes an encoded string from the given byte array as originally + encoded for descending order.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        KeyDecoder

        +
        public KeyDecoder()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        decodeIntDesc

        +
        public static int decodeIntDesc(byte[] src,
        +                int srcOffset)
        +                         throws CorruptEncodingException
        +
        Decodes a signed integer from exactly 4 bytes, as encoded for descending + order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed integer value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeIntegerObjDesc

        +
        public static java.lang.Integer decodeIntegerObjDesc(byte[] src,
        +                                     int srcOffset)
        +                                              throws CorruptEncodingException
        +
        Decodes a signed Integer object from exactly 1 or 5 bytes, as encoded + for descending order. If null is returned, then 1 byte was read.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed Integer object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeLongDesc

        +
        public static long decodeLongDesc(byte[] src,
        +                  int srcOffset)
        +                           throws CorruptEncodingException
        +
        Decodes a signed long from exactly 8 bytes, as encoded for descending + order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed long value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeLongObjDesc

        +
        public static java.lang.Long decodeLongObjDesc(byte[] src,
        +                               int srcOffset)
        +                                        throws CorruptEncodingException
        +
        Decodes a signed Long object from exactly 1 or 9 bytes, as encoded for + descending order. If null is returned, then 1 byte was read.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed Long object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeByteDesc

        +
        public static byte decodeByteDesc(byte[] src,
        +                  int srcOffset)
        +                           throws CorruptEncodingException
        +
        Decodes a signed byte from exactly 1 byte, as encoded for descending + order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed byte value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeByteObjDesc

        +
        public static java.lang.Byte decodeByteObjDesc(byte[] src,
        +                               int srcOffset)
        +                                        throws CorruptEncodingException
        +
        Decodes a signed Byte object from exactly 1 or 2 bytes, as encoded for + descending order. If null is returned, then 1 byte was read.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed Byte object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeShortDesc

        +
        public static short decodeShortDesc(byte[] src,
        +                    int srcOffset)
        +                             throws CorruptEncodingException
        +
        Decodes a signed short from exactly 2 bytes, as encoded for descending + order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed short value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeShortObjDesc

        +
        public static java.lang.Short decodeShortObjDesc(byte[] src,
        +                                 int srcOffset)
        +                                          throws CorruptEncodingException
        +
        Decodes a signed Short object from exactly 1 or 3 bytes, as encoded for + descending order. If null is returned, then 1 byte was read.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        signed Short object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeCharDesc

        +
        public static char decodeCharDesc(byte[] src,
        +                  int srcOffset)
        +                           throws CorruptEncodingException
        +
        Decodes a char from exactly 2 bytes, as encoded for descending order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        char value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeCharacterObjDesc

        +
        public static java.lang.Character decodeCharacterObjDesc(byte[] src,
        +                                         int srcOffset)
        +                                                  throws CorruptEncodingException
        +
        Decodes a Character object from exactly 1 or 3 bytes, as encoded for + descending order. If null is returned, then 1 byte was read.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        Character object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeBooleanDesc

        +
        public static boolean decodeBooleanDesc(byte[] src,
        +                        int srcOffset)
        +                                 throws CorruptEncodingException
        +
        Decodes a boolean from exactly 1 byte, as encoded for descending order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        boolean value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeBooleanObjDesc

        +
        public static java.lang.Boolean decodeBooleanObjDesc(byte[] src,
        +                                     int srcOffset)
        +                                              throws CorruptEncodingException
        +
        Decodes a Boolean object from exactly 1 byte, as encoded for descending + order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        Boolean object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeFloatDesc

        +
        public static float decodeFloatDesc(byte[] src,
        +                    int srcOffset)
        +                             throws CorruptEncodingException
        +
        Decodes a float from exactly 4 bytes, as encoded for descending order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        float value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeFloatObjDesc

        +
        public static java.lang.Float decodeFloatObjDesc(byte[] src,
        +                                 int srcOffset)
        +                                          throws CorruptEncodingException
        +
        Decodes a Float object from exactly 4 bytes.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        Float object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeDoubleDesc

        +
        public static double decodeDoubleDesc(byte[] src,
        +                      int srcOffset)
        +                               throws CorruptEncodingException
        +
        Decodes a double from exactly 8 bytes, as encoded for descending order.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        double value
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decodeDoubleObjDesc

        +
        public static java.lang.Double decodeDoubleObjDesc(byte[] src,
        +                                   int srcOffset)
        +                                            throws CorruptEncodingException
        +
        Decodes a Double object from exactly 8 bytes.
        +
        Parameters:
        src - source of encoded bytes
        srcOffset - offset into source array
        +
        Returns:
        Double object or null
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + +
        +
      • +

        decode

        +
        public static int decode(byte[] src,
        +         int srcOffset,
        +         java.math.BigInteger[] valueRef)
        +                  throws CorruptEncodingException
        +
        Decodes the given BigInteger as originally encoded for ascending order.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded BigInteger is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        Since:
        +
        1.2
        +
      • +
      + + + +
        +
      • +

        decodeDesc

        +
        public static int decodeDesc(byte[] src,
        +             int srcOffset,
        +             java.math.BigInteger[] valueRef)
        +                      throws CorruptEncodingException
        +
        Decodes the given BigInteger as originally encoded for descending order.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded BigInteger is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        Since:
        +
        1.2
        +
      • +
      + + + +
        +
      • +

        decode

        +
        public static int decode(byte[] src,
        +         int srcOffset,
        +         java.math.BigDecimal[] valueRef)
        +                  throws CorruptEncodingException
        +
        Decodes the given BigDecimal as originally encoded for ascending order.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded BigDecimal is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        Since:
        +
        1.2
        +
      • +
      + + + +
        +
      • +

        decodeDesc

        +
        public static int decodeDesc(byte[] src,
        +             int srcOffset,
        +             java.math.BigDecimal[] valueRef)
        +                      throws CorruptEncodingException
        +
        Decodes the given BigDecimal as originally encoded for descending order.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded BigDecimal is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        Since:
        +
        1.2
        +
      • +
      + + + +
        +
      • +

        decode

        +
        public static int decode(byte[] src,
        +         int srcOffset,
        +         byte[][] valueRef)
        +                  throws CorruptEncodingException
        +
        Decodes the given byte array as originally encoded for ascending order. + The decoding stops when any kind of terminator or illegal byte has been + read. The decoded bytes are stored in valueRef.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded byte array is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        +
      • +
      + + + +
        +
      • +

        decodeDesc

        +
        public static int decodeDesc(byte[] src,
        +             int srcOffset,
        +             byte[][] valueRef)
        +                      throws CorruptEncodingException
        +
        Decodes the given byte array as originally encoded for descending order. + The decoding stops when any kind of terminator or illegal byte has been + read. The decoded bytes are stored in valueRef.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded byte array is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        +
      • +
      + + + +
        +
      • +

        decodeString

        +
        public static int decodeString(byte[] src,
        +               int srcOffset,
        +               java.lang.String[] valueRef)
        +                        throws CorruptEncodingException
        +
        Decodes an encoded string from the given byte array.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded string is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        +
      • +
      + + + +
        +
      • +

        decodeStringDesc

        +
        public static int decodeStringDesc(byte[] src,
        +                   int srcOffset,
        +                   java.lang.String[] valueRef)
        +                            throws CorruptEncodingException
        +
        Decodes an encoded string from the given byte array as originally + encoded for descending order.
        +
        Parameters:
        src - source of encoded data
        srcOffset - offset into encoded data
        valueRef - decoded string is stored in element 0, which may be null
        +
        Returns:
        amount of bytes read from source
        +
        Throws:
        +
        CorruptEncodingException - if source data is corrupt
        +
      • +
      + + + + + + + +
        +
      • +

        decodeSingleDesc

        +
        public static byte[] decodeSingleDesc(byte[] src,
        +                      int prefixPadding,
        +                      int suffixPadding)
        +                               throws CorruptEncodingException
        +
        Decodes the given byte array which was encoded by KeyEncoder.encodeSingleDesc(byte[]). Always returns a new byte array instance.
        +
        Parameters:
        prefixPadding - amount of extra bytes to skip from start of encoded byte array
        suffixPadding - amount of extra bytes to skip at end of encoded byte array
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      + + + + + + + +
        +
      • +

        decodeSingleNullableDesc

        +
        public static byte[] decodeSingleNullableDesc(byte[] src,
        +                              int prefixPadding,
        +                              int suffixPadding)
        +                                       throws CorruptEncodingException
        +
        Decodes the given byte array which was encoded by KeyEncoder.encodeSingleNullableDesc(byte[]). Always returns a new byte array + instance.
        +
        Parameters:
        prefixPadding - amount of extra bytes to skip from start of encoded byte array
        suffixPadding - amount of extra bytes to skip at end of encoded byte array
        +
        Throws:
        +
        CorruptEncodingException
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3