brf.j2me.dynaworks.db
Class ShortField

java.lang.Object
  |
  +--brf.j2me.dynaworks.db.RecordField
        |
        +--brf.j2me.dynaworks.db.ShortField

public class ShortField
extends RecordField

Record field holding a Short value.

Version:
1.0
Author:
Bernd R. Fix
See Also:
RecordField

Field Summary
private  java.lang.Short content
          Short value as field data.
 
Fields inherited from class brf.j2me.dynaworks.db.RecordField
size
 
Constructor Summary
ShortField()
          Construct a new Short record field.
 
Method Summary
 boolean fromImage(byte[] m)
          Convert a byte array into short field data.
 short getValue()
          Return the value of the record field.
 void setValue(short i)
          Set the value of the record field.
 byte[] toImage()
          Convert the short field data into a byte array.
 
Methods inherited from class brf.j2me.dynaworks.db.RecordField
getExpectedSize, getSize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

content

private java.lang.Short content
Short value as field data.
Constructor Detail

ShortField

public ShortField()
Construct a new Short record field.

Method Detail

getValue

public short getValue()
Return the value of the record field.

Returns:
short - value of the field.

setValue

public void setValue(short i)
Set the value of the record field.

Parameters:
i - short - value for the record field.

toImage

public byte[] toImage()
Convert the short field data into a byte array.

Overrides:
toImage in class RecordField
Returns:
byte[] - array containing the field data.

fromImage

public boolean fromImage(byte[] m)
Convert a byte array into short field data.

Overrides:
fromImage in class RecordField
Parameters:
m - byte[] - array holding the data.
Returns:
boolean - conversion successful?