nl.knaw.dans.common.dbflib
Class DateValue

java.lang.Object
  extended by nl.knaw.dans.common.dbflib.Value
      extended by nl.knaw.dans.common.dbflib.DateValue

public class DateValue
extends Value

Represents a Date value in a record.

Author:
Jan van Mansum

Field Summary
 
Fields inherited from class nl.knaw.dans.common.dbflib.Value
typed
 
Constructor Summary
DateValue(Date dateValue)
          Creates a new DateValue object.
 
Method Summary
protected  byte[] doGetRawValue(Field field)
          Converts the typed value to a byte array, according to the field specifications provided.
protected  Object doGetTypedValue(byte[] rawValue)
          Converts the raw bytes to a Java object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateValue

public DateValue(Date dateValue)
Creates a new DateValue object.

Parameters:
dateValue - a Date object
Method Detail

doGetTypedValue

protected Object doGetTypedValue(byte[] rawValue)
Description copied from class: Value
Converts the raw bytes to a Java object. The class of Java object to create is determined by the subclass of Value.

Specified by:
doGetTypedValue in class Value
Returns:
the value as a Java object

doGetRawValue

protected byte[] doGetRawValue(Field field)
                        throws ValueTooLargeException
Description copied from class: Value
Converts the typed value to a byte array, according to the field specifications provided.

Specified by:
doGetRawValue in class Value
Parameters:
field - the field specifications
Returns:
a byte array containing the raw value
Throws:
ValueTooLargeException - if the value is too large for the field


Copyright © 2009-2012 DANS. All Rights Reserved.