omerojava.util
Class FloatConverter

java.lang.Object
  extended by omerojava.util.FloatConverter

public class FloatConverter
extends Object

Packs a sequence of bytes representing a big-endian float into a double value of appropriate integer type.

This class handles the conversion of float of 4-byte length (bytes are assumed to be 8-bit long).

Since:
OME3.0
Version:
3.0 (Internal version: $Revision: $Date: $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk, Donald MacDonald      donald@lifesci.dundee.ac.uk

Constructor Summary
FloatConverter()
           
 
Method Summary
 double pack(ReadOnlyByteArray data, int offset, int length)
          Implemented as specified by BytesConverter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatConverter

public FloatConverter()
Method Detail

pack

public double pack(ReadOnlyByteArray data,
                   int offset,
                   int length)
Implemented as specified by BytesConverter

Parameters:
data - The byte array containing the bytes to convert.
offset - The position of the first byte making up the pixel value.
length - The number of bytes that make up the pixel value.
Returns:
An object to wrap the actual numeric value.
See Also:
BytesConverter.pack(ReadOnlyByteArray, int, int)


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

Copyright © 2009 The University of Dundee. All Rights Reserved.