com.amazon.carbonado.raw
Class RawUtil

java.lang.Object
  extended by com.amazon.carbonado.raw.RawUtil

public class RawUtil
extends Object

Utilities for manipulating binary data.

Author:
Brian S O'Neill

Constructor Summary
RawUtil()
           
 
Method Summary
static boolean decrement(byte[] value)
          Subtracts one from an unsigned integer, represented as a byte array.
static boolean increment(byte[] value)
          Adds one to an unsigned integer, represented as a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawUtil

public RawUtil()
Method Detail

increment

public static boolean increment(byte[] value)
Adds one to an unsigned integer, represented as a byte array. If overflowed, value in byte array is 0x00, 0x00, 0x00...

Parameters:
value - unsigned integer to increment
Returns:
false if overflowed

decrement

public static boolean decrement(byte[] value)
Subtracts one from an unsigned integer, represented as a byte array. If overflowed, value in byte array is 0xff, 0xff, 0xff...

Parameters:
value - unsigned integer to decrement
Returns:
false if overflowed


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