Package ffx.utilities

Class ByteSwap

java.lang.Object
ffx.utilities.ByteSwap

public class ByteSwap extends Object
ByteSwap class.
Since:
1.0
Author:
Timothy D. Fenn
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    swap(double value)
    Byte swap a single double value.
    static void
    swap(double[] array)
    Byte swap an array of doubles.
    static float
    swap(float value)
    Byte swap a single float value.
    static void
    swap(float[] array)
    Byte swap an array of floats.
    static int
    swap(int value)
    Byte swap a single int value.
    static void
    swap(int[] array)
    Byte swap an array of ints.
    static long
    swap(long value)
    Byte swap a single long value.
    static void
    swap(long[] array)
    Byte swap an array of longs.
    static short
    swap(short value)
    Byte swap a single short value.
    static void
    swap(short[] array)
    Byte swap an array of shorts.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • swap

      public static short swap(short value)
      Byte swap a single short value.
      Parameters:
      value - Value to byte swap.
      Returns:
      Byte swapped representation.
    • swap

      public static int swap(int value)
      Byte swap a single int value.
      Parameters:
      value - Value to byte swap.
      Returns:
      Byte swapped representation.
    • swap

      public static long swap(long value)
      Byte swap a single long value.
      Parameters:
      value - Value to byte swap.
      Returns:
      Byte swapped representation.
    • swap

      public static float swap(float value)
      Byte swap a single float value.
      Parameters:
      value - Value to byte swap.
      Returns:
      Byte swapped representation.
    • swap

      public static double swap(double value)
      Byte swap a single double value.
      Parameters:
      value - Value to byte swap.
      Returns:
      Byte swapped representation.
    • swap

      public static void swap(short[] array)
      Byte swap an array of shorts. The result of the swapping is put back into the specified array.
      Parameters:
      array - Array of values to swap
    • swap

      public static void swap(int[] array)
      Byte swap an array of ints. The result of the swapping is put back into the specified array.
      Parameters:
      array - Array of values to swap
    • swap

      public static void swap(long[] array)
      Byte swap an array of longs. The result of the swapping is put back into the specified array.
      Parameters:
      array - Array of values to swap
    • swap

      public static void swap(float[] array)
      Byte swap an array of floats. The result of the swapping is put back into the specified array.
      Parameters:
      array - Array of values to swap
    • swap

      public static void swap(double[] array)
      Byte swap an array of doubles. The result of the swapping is put back into the specified array.
      Parameters:
      array - Array of values to swap