WebLogic Integration


com.bea.wlxt.bintype
Class BintypeDate

java.lang.Object
  |
  +--com.bea.wlxt.bintype.Bintype
        |
        +--com.bea.wlxt.bintype.BintypeDate

public abstract class BintypeDate
extends Bintype

This class provides the default implementation for Data Types used by the WLXT to translate Binary Date Data to XML or XML data to Binary Date data.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Fields inherited from class com.bea.wlxt.bintype.Bintype
codepageEBCDIC
 
Constructor Summary
BintypeDate()
           
 
Method Summary
protected static java.lang.String rawDateToString(byte[] data, java.lang.String baseType)
          Take a date that is in byte array format and return it as a String.
protected static java.lang.String readDate(java.lang.String date, java.text.SimpleDateFormat fmt)
          Returns a String containing the date.
protected static java.lang.String readDate(java.lang.String date, java.text.SimpleDateFormat fmt, com.bea.wlxt.mfl.MFLField fld, int yearpos)
          Returns a String containing the date.
protected static byte[] stringDateToRaw(java.lang.String date, java.lang.String baseType)
          Take a date that is in String format and return it in a byte array.
protected static java.lang.String writeDate(java.lang.String date, java.text.SimpleDateFormat fmt)
          Returns a String containing the date to be written.
 
Methods inherited from class com.bea.wlxt.bintype.Bintype
applyPadAndTrim, canBeDelimited, canBeFieldType, canBeLenFieldType, canBePadded, canBeTagFieldType, canBeTrimmed, canHaveDecimalPlaces, getBinaryBytes, getDescriptionText, getDisplayName, getTypeName, isCodepageOK, isCutoffRequired, isDateType, isFixedSize, isValueOK, makeString, read, readDelimitedField, readLength, readTag, reverseBytes, write, writeLength, writeTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BintypeDate

public BintypeDate()
Method Detail

readDate

protected static java.lang.String readDate(java.lang.String date,
                                           java.text.SimpleDateFormat fmt)
                                    throws java.lang.Exception
Returns a String containing the date.

Parameters:
date - String the Date that is to be read/parsed.
fmt - SimpleDateFormat object that describes the the date format.

readDate

protected static java.lang.String readDate(java.lang.String date,
                                           java.text.SimpleDateFormat fmt,
                                           com.bea.wlxt.mfl.MFLField fld,
                                           int yearpos)
                                    throws java.lang.Exception
Returns a String containing the date.

Parameters:
date - String the Date that is to be read/parsed.
fmt - SimpleDateFormat object that describes the the date format.
fld - MFLField the field description for the date field
yearpos - int the relative position of the year field in the date format.
Throws:
BinTypeException - when invalid data is encountered.

writeDate

protected static java.lang.String writeDate(java.lang.String date,
                                            java.text.SimpleDateFormat fmt)
                                     throws java.lang.Exception
Returns a String containing the date to be written.

Parameters:
date - String the Date that is to be written.
fmt - String the codepage that applies to the output data format.

rawDateToString

protected static java.lang.String rawDateToString(byte[] data,
                                                  java.lang.String baseType)
                                           throws java.io.UnsupportedEncodingException
Take a date that is in byte array format and return it as a String.

Parameters:
data - byte[] a byte array that contains the Date value to be converted to String format.
baseType - String the codepage that applies to the output data format.
Throws:
UnsupportedEncodingException -  

stringDateToRaw

protected static byte[] stringDateToRaw(java.lang.String date,
                                        java.lang.String baseType)
                                 throws java.io.UnsupportedEncodingException
Take a date that is in String format and return it in a byte array.

Parameters:
date - String the Date that is to be converted to a byte array.
baseType - String the codepage that applies to the output data format.
Throws:
UnsupportedEncodingException -  

WebLogic Integration

WebLogic Integration (WLI)