ByteSwapper (Jython API documentation)
Date: 2012-08-13

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.python.core.util
Class ByteSwapper

    java.lang.Object
      org.python.core.util.ByteSwapper

    public class ByteSwapper

extends Object

Simple class that provides the capability to swap or reverse the byte order of all elements of an `Array`. Used to convert from one endian type to another. The class swaps the following types:

- short
- integer
- long
- float
- double

Note this functionality is provided in the base types since 1.5.

Author:
  Andrew Howard

Constructor Summary
`ByteSwapper()`

Method Summary
`static void` | `swap(Object array)` Reverses the byte order of all elements in the supplied array, converting between little and big endian byte order.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ByteSwapper

    public ByteSwapper()

Method Detail

### swap

    public static void swap(Object array)

  Reverses the byte order of all elements in the supplied array, converting between little and big endian byte order.

  Parameters:
    `array` - the input array for type sensitive byte swapping.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Jython homepage