Class ArrayConversionHelper

java.lang.Object
org.datanucleus.store.types.converters.ArrayConversionHelper

public class ArrayConversionHelper extends Object
Helper class providing conversion methods for use with arrays.
  • Field Details

    • NR_BIGINTEGER_BYTES

      private static int NR_BIGINTEGER_BYTES
    • NR_SCALE_BYTES

      private static int NR_SCALE_BYTES
    • NR_SIGNAL_BYTES

      private static int NR_SIGNAL_BYTES
    • TOTAL_BYTES

      private static int TOTAL_BYTES
  • Constructor Details

    • ArrayConversionHelper

      public ArrayConversionHelper()
  • Method Details

    • getBooleanArrayFromBitSet

      public static boolean[] getBooleanArrayFromBitSet(BitSet value)
      Convert an instance of our value class into a boolean[].
      Parameters:
      value - Object to be converted
      Returns:
      converted boolean array
    • getBitSetFromBooleanArray

      public static BitSet getBitSetFromBooleanArray(boolean[] buf)
      Convert a boolean[] into an instance of our value class.
      Parameters:
      buf - boolean array to be converted
      Returns:
      converted boolean array as BitSet
    • getBooleanArrayFromByteArray

      public static boolean[] getBooleanArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted boolean array as object
    • getByteArrayFromBooleanArray

      public static byte[] getByteArrayFromBooleanArray(boolean[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getCharArrayFromByteArray

      public static char[] getCharArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted char array as object
    • getByteArrayFromCharArray

      public static byte[] getByteArrayFromCharArray(char[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getDoubleArrayFromByteArray

      public static double[] getDoubleArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted double array as object
    • getByteArrayFromDoubleArray

      public static byte[] getByteArrayFromDoubleArray(double[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getFloatArrayFromByteArray

      public static float[] getFloatArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted float array as object
    • getByteArrayFromFloatArray

      public static byte[] getByteArrayFromFloatArray(float[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getIntArrayFromByteArray

      public static int[] getIntArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted int array as object
    • getByteArrayFromIntArray

      public static byte[] getByteArrayFromIntArray(int[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getLongArrayFromByteArray

      public static long[] getLongArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted long array as object
    • getByteArrayFromLongArray

      public static byte[] getByteArrayFromLongArray(long[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getShortArrayFromByteArray

      public static short[] getShortArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted short array as object
    • getByteArrayFromShortArray

      public static byte[] getByteArrayFromShortArray(short[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getByteArrayFromBigDecimalArray

      public static byte[] getByteArrayFromBigDecimalArray(BigDecimal[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getBigDecimalArrayFromByteArray

      public static BigDecimal[] getBigDecimalArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted BigDecimal array as object
    • getByteArrayFromBigIntegerArray

      public static byte[] getByteArrayFromBigIntegerArray(BigInteger[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Object to be converted
      Returns:
      converted byte array
    • getBigIntegerArrayFromByteArray

      public static BigInteger[] getBigIntegerArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted short array as object
    • getByteArrayFromBooleanObjectArray

      public static byte[] getByteArrayFromBooleanObjectArray(Boolean[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Boolean[] to be converted
      Returns:
      converted byte array
    • getBooleanObjectArrayFromByteArray

      public static Boolean[] getBooleanObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Boolean array as object
    • getByteArrayFromByteObjectArray

      public static byte[] getByteArrayFromByteObjectArray(Byte[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Byte[] to be converted
      Returns:
      converted byte array
    • getByteObjectArrayFromByteArray

      public static Byte[] getByteObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Byte array as object
    • getByteArrayFromCharObjectArray

      public static byte[] getByteArrayFromCharObjectArray(Character[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Character array to be converted
      Returns:
      converted byte array
    • getCharObjectArrayFromByteArray

      public static Character[] getCharObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Character array as object
    • getByteArrayFromDoubleObjectArray

      public static byte[] getByteArrayFromDoubleObjectArray(Double[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Double array to be converted
      Returns:
      converted byte array
    • getDoubleObjectArrayFromByteArray

      public static Double[] getDoubleObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Double array as object
    • getByteArrayFromFloatObjectArray

      public static byte[] getByteArrayFromFloatObjectArray(Float[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Float array to be converted
      Returns:
      converted byte array
    • getFloatObjectArrayFromByteArray

      public static Float[] getFloatObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Float array as object
    • getByteArrayFromIntObjectArray

      public static byte[] getByteArrayFromIntObjectArray(Integer[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Integer array to be converted
      Returns:
      converted byte array
    • getIntObjectArrayFromByteArray

      public static Integer[] getIntObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Integer array as object
    • getByteArrayFromLongObjectArray

      public static byte[] getByteArrayFromLongObjectArray(Long[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Long array to be converted
      Returns:
      converted byte array
    • getLongObjectArrayFromByteArray

      public static Long[] getLongObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Long array as object
    • getByteArrayFromShortObjectArray

      public static byte[] getByteArrayFromShortObjectArray(Short[] value)
      Convert an instance of our value class into a byte[].
      Parameters:
      value - Short array to be converted
      Returns:
      converted byte array
    • getShortObjectArrayFromByteArray

      public static Short[] getShortObjectArrayFromByteArray(byte[] buf)
      Convert a byte[] into an instance of our value class.
      Parameters:
      buf - byte array to be converted
      Returns:
      converted Short array as object