org.codehaus.spice.salt.io
Class EndianUtil
java.lang.Object
org.codehaus.spice.salt.io.EndianUtil
public final class EndianUtil
- extends Object
Utility code for dealing with different endian systems.
- Version:
- CVS $Revision: 1.1 $ $Date: 2003/12/02 02:15:04 $
- Author:
- Peter Donald
Method Summary |
static double |
readSwappedDouble(byte[] data,
int offset)
|
static double |
readSwappedDouble(InputStream input)
|
static float |
readSwappedFloat(byte[] data,
int offset)
|
static float |
readSwappedFloat(InputStream input)
|
static int |
readSwappedInteger(byte[] data,
int offset)
|
static int |
readSwappedInteger(InputStream input)
|
static long |
readSwappedLong(byte[] data,
int offset)
|
static long |
readSwappedLong(InputStream input)
|
static short |
readSwappedShort(byte[] data,
int offset)
|
static short |
readSwappedShort(InputStream input)
|
static long |
readSwappedUnsignedInteger(byte[] data,
int offset)
|
static long |
readSwappedUnsignedInteger(InputStream input)
|
static int |
readSwappedUnsignedShort(byte[] data,
int offset)
|
static int |
readSwappedUnsignedShort(InputStream input)
|
static double |
swapDouble(double value)
|
static float |
swapFloat(float value)
|
static int |
swapInteger(int value)
|
static long |
swapLong(long value)
|
static short |
swapShort(short value)
|
static void |
writeSwappedDouble(byte[] data,
int offset,
double value)
|
static void |
writeSwappedDouble(OutputStream output,
double value)
|
static void |
writeSwappedFloat(byte[] data,
int offset,
float value)
|
static void |
writeSwappedFloat(OutputStream output,
float value)
|
static void |
writeSwappedInteger(byte[] data,
int offset,
int value)
|
static void |
writeSwappedInteger(OutputStream output,
int value)
|
static void |
writeSwappedLong(byte[] data,
int offset,
long value)
|
static void |
writeSwappedLong(OutputStream output,
long value)
|
static void |
writeSwappedShort(byte[] data,
int offset,
short value)
|
static void |
writeSwappedShort(OutputStream output,
short value)
|
static void |
writeSwappedUnsignedInteger(byte[] data,
int offset,
long value)
|
static void |
writeSwappedUnsignedInteger(OutputStream output,
long value)
|
static void |
writeSwappedUnsignedShort(byte[] data,
int offset,
int value)
|
static void |
writeSwappedUnsignedShort(OutputStream output,
int value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIZEOF_BYTE
public static final int SIZEOF_BYTE
- See Also:
- Constant Field Values
SIZEOF_SHORT
public static final int SIZEOF_SHORT
- See Also:
- Constant Field Values
SIZEOF_INT
public static final int SIZEOF_INT
- See Also:
- Constant Field Values
SIZEOF_FLOAT
public static final int SIZEOF_FLOAT
- See Also:
- Constant Field Values
SIZEOF_LONG
public static final int SIZEOF_LONG
- See Also:
- Constant Field Values
EndianUtil
public EndianUtil()
swapShort
public static short swapShort(short value)
swapInteger
public static int swapInteger(int value)
swapLong
public static long swapLong(long value)
swapFloat
public static float swapFloat(float value)
swapDouble
public static double swapDouble(double value)
writeSwappedShort
public static void writeSwappedShort(byte[] data,
int offset,
short value)
writeSwappedUnsignedShort
public static void writeSwappedUnsignedShort(byte[] data,
int offset,
int value)
readSwappedShort
public static short readSwappedShort(byte[] data,
int offset)
readSwappedUnsignedShort
public static int readSwappedUnsignedShort(byte[] data,
int offset)
writeSwappedUnsignedInteger
public static void writeSwappedUnsignedInteger(byte[] data,
int offset,
long value)
writeSwappedInteger
public static void writeSwappedInteger(byte[] data,
int offset,
int value)
readSwappedInteger
public static int readSwappedInteger(byte[] data,
int offset)
readSwappedUnsignedInteger
public static long readSwappedUnsignedInteger(byte[] data,
int offset)
writeSwappedLong
public static void writeSwappedLong(byte[] data,
int offset,
long value)
readSwappedLong
public static long readSwappedLong(byte[] data,
int offset)
writeSwappedFloat
public static void writeSwappedFloat(byte[] data,
int offset,
float value)
readSwappedFloat
public static float readSwappedFloat(byte[] data,
int offset)
writeSwappedDouble
public static void writeSwappedDouble(byte[] data,
int offset,
double value)
readSwappedDouble
public static double readSwappedDouble(byte[] data,
int offset)
writeSwappedShort
public static void writeSwappedShort(OutputStream output,
short value)
throws IOException
- Throws:
IOException
writeSwappedUnsignedShort
public static void writeSwappedUnsignedShort(OutputStream output,
int value)
throws IOException
- Throws:
IOException
readSwappedShort
public static short readSwappedShort(InputStream input)
throws IOException
- Throws:
IOException
readSwappedUnsignedShort
public static int readSwappedUnsignedShort(InputStream input)
throws IOException
- Throws:
IOException
writeSwappedInteger
public static void writeSwappedInteger(OutputStream output,
int value)
throws IOException
- Throws:
IOException
writeSwappedUnsignedInteger
public static void writeSwappedUnsignedInteger(OutputStream output,
long value)
throws IOException
- Throws:
IOException
readSwappedInteger
public static int readSwappedInteger(InputStream input)
throws IOException
- Throws:
IOException
readSwappedUnsignedInteger
public static long readSwappedUnsignedInteger(InputStream input)
throws IOException
- Throws:
IOException
writeSwappedLong
public static void writeSwappedLong(OutputStream output,
long value)
throws IOException
- Throws:
IOException
readSwappedLong
public static long readSwappedLong(InputStream input)
throws IOException
- Throws:
IOException
writeSwappedFloat
public static void writeSwappedFloat(OutputStream output,
float value)
throws IOException
- Throws:
IOException
readSwappedFloat
public static float readSwappedFloat(InputStream input)
throws IOException
- Throws:
IOException
writeSwappedDouble
public static void writeSwappedDouble(OutputStream output,
double value)
throws IOException
- Throws:
IOException
readSwappedDouble
public static double readSwappedDouble(InputStream input)
throws IOException
- Throws:
IOException
Copyright © 1999-2012 Codehaus. All Rights Reserved.