net.sf.dexterim.oscar.entity
Class DWord

java.lang.Object
  extended bynet.sf.dexterim.oscar.entity.ByteBase
      extended bynet.sf.dexterim.oscar.entity.DWord
All Implemented Interfaces:
ByteBased

public class DWord
extends ByteBase

DWord Class wraps the dword datatype known from C/C++. A DWord can be constructed from an int value or from a 4 byte array.

Author:
christoph

Constructor Summary
DWord()
          Creates a DWord from an int Value
DWord(byte[] data)
          Creates a DWord from a byte array
DWord(int value)
          Creates a DWord from an int Value
 
Method Summary
static DWord createFrom(byte[] data)
          Creates a DWord from an byte array
 int getLength()
          Returns the length in bytes.
 java.lang.String toString()
           
 
Methods inherited from class net.sf.dexterim.oscar.entity.ByteBase
getValue, toByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DWord

public DWord(int value)
Creates a DWord from an int Value

Parameters:
value -

DWord

public DWord()
Creates a DWord from an int Value


DWord

public DWord(byte[] data)
Creates a DWord from a byte array

Parameters:
data - byte array. Not null and filled with 4 bytes
Method Detail

createFrom

public static DWord createFrom(byte[] data)
Creates a DWord from an byte array

Parameters:
data - byte array. Not null and filled with 4 bytes
Returns:

getLength

public int getLength()
Returns the length in bytes. For DWord always length of 4 is returned.

Returns:
length in bytes always four for DWord
See Also:
ByteBased.getLength()

toString

public java.lang.String toString()


Copyright © 2003-2004 Dexter IM Team. All Rights Reserved.