code: public static byte numberOfBytesRequired(long number) {
          if(number < 0)
              number = -number;
          for(byte i = 1; i <= SIZE_OF_LONG; i++)
              if(number < (1L << (8 * i)))
                  return i;
          throw new IllegalStateException("Should never happen.");
      }
docs: The number of bytes required to hold the given number
  
  @param number The number being checked.
  @return The required number of bytes (must be 8 or less)