Class Utils


  • public class Utils
    extends java.lang.Object
    Various utility functions for Hadoop record I/O runtime.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean bufEquals​(byte[] onearray, byte[] twoarray)
      equals function that actually compares two buffers.
      static int compareBytes​(byte[] b1, int off1, int len1, byte[] b2, int off2, int len2)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • bufEquals

        public static boolean bufEquals​(byte[] onearray,
                                        byte[] twoarray)
        equals function that actually compares two buffers.
        Parameters:
        onearray - First buffer
        twoarray - Second buffer
        Returns:
        true if one and two contain exactly the same content, else false.
      • compareBytes

        public static int compareBytes​(byte[] b1,
                                       int off1,
                                       int len1,
                                       byte[] b2,
                                       int off2,
                                       int len2)