org.jcodec.algo
Class DataConvert

java.lang.Object
  extended by org.jcodec.algo.DataConvert

public class DataConvert
extends Object

This class is part of JCodec ( www.jcodec.org ) This software is distributed under FreeBSD License Integer to byte and vice versa conversion routines

Author:
The JCodec project

Constructor Summary
DataConvert()
           
 
Method Summary
static int[] from16BE(byte[] b)
           
static int[] from16LE(byte[] b)
           
static int[] from24BE(byte[] b)
           
static int[] from24LE(byte[] b)
           
static int[] fromByte(byte[] b, int depth, boolean isBe)
          Generic byte-array to integer-array conversion Converts each depth-bit sequence from the input byte array into integer
static byte[] to16BE(int[] ia)
           
static byte[] to16LE(int[] ia)
           
static byte[] to24BE(int[] ia)
           
static byte[] to24LE(int[] ia)
           
static byte[] toByte(int[] ia, int depth, boolean isBe)
          Generic integer-array to byte-array conversion Converts each integer into depth-bit sequence in the output byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataConvert

public DataConvert()
Method Detail

from16BE

public static int[] from16BE(byte[] b)

from24BE

public static int[] from24BE(byte[] b)

from16LE

public static int[] from16LE(byte[] b)

from24LE

public static int[] from24LE(byte[] b)

to16BE

public static byte[] to16BE(int[] ia)

to24BE

public static byte[] to24BE(int[] ia)

to16LE

public static byte[] to16LE(int[] ia)

to24LE

public static byte[] to24LE(int[] ia)

fromByte

public static int[] fromByte(byte[] b,
                             int depth,
                             boolean isBe)
Generic byte-array to integer-array conversion Converts each depth-bit sequence from the input byte array into integer

Parameters:
b - Input bytes
depth - Bit depth of the integers
isBe - If integers are big-endian or little-endian
Returns:

toByte

public static byte[] toByte(int[] ia,
                            int depth,
                            boolean isBe)
Generic integer-array to byte-array conversion Converts each integer into depth-bit sequence in the output byte array

Parameters:
ia - Integer array
depth - Bit depth of the integers
isBe - If integers are big-endian or little-endian
Returns:


Copyright © 2013. All Rights Reserved.