org.apache.avro.io
Class BinaryData

java.lang.Object
  extended by org.apache.avro.io.BinaryData

public class BinaryData
extends Object

Utilities for binary-encoded data.


Method Summary
static int compare(byte[] b1, int s1, byte[] b2, int s2, Schema schema)
          Compare binary encoded data.
static int compareBytes(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
          Lexicographically compare bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compare

public static int compare(byte[] b1,
                          int s1,
                          byte[] b2,
                          int s2,
                          Schema schema)
Compare binary encoded data. If equal, return zero. If greater-than, return 1, if less than return -1. Order is consistent with that of GenericData.compare(Object, Object, Schema).


compareBytes

public static int compareBytes(byte[] b1,
                               int s1,
                               int l1,
                               byte[] b2,
                               int s2,
                               int l2)
Lexicographically compare bytes. If equal, return zero. If greater-than, return a positive value, if less than return a negative value.



Copyright © 2010 The Apache Software Foundation