WebLogic Integration


com.bea.wlxt.bintype
Class BintypeDate

java.lang.Object
  |
  +--com.bea.wlxt.bintype.Bintype
        |
        +--com.bea.wlxt.bintype.BintypeDate
Direct Known Subclasses:
BintypeDate_Chhmi, BintypeDate_Chhmipm, BintypeDate_Chhmiss, BintypeDate_Chhmisspm, BintypeDate_Date, BintypeDate_DateTime, BintypeDate_Dddmonyy, BintypeDate_Dddmonyyyy, BintypeDate_ddmonyy, BintypeDate_ddmonyyyy, BintypeDate_Dmonyy, BintypeDate_Dmonyyyy, BintypeDate_hhmiss, BintypeDate_JavaDate, BintypeDate_mmddyy, BintypeDate_mmddyyhhmi, BintypeDate_mmddyyhhmiss, BintypeDate_mmddyyyy, BintypeDate_monddyyyy, BintypeDate_monyy, BintypeDate_monyyyy, BintypeDate_SCddmmyyhhmi, BintypeDate_SCddmmyyhhmipm, BintypeDate_SCddmmyyhhmiss, BintypeDate_SCddmmyyhhmisspm, BintypeDate_SCmmddyyhhmi, BintypeDate_SCmmddyyhhmipm, BintypeDate_SCmmddyyhhmiss, BintypeDate_SCmmddyyhhmisspm, BintypeDate_Sddmmyy, BintypeDate_Sddmmyyyy, BintypeDate_Smmddyy, BintypeDate_Smmddyyyy, BintypeDate_Time

public abstract class BintypeDate
extends Bintype

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
 java.lang.String getLocalizedDate()
          Generate localized date for testing purposes based on parent classes format
abstract  java.text.SimpleDateFormat getLocalizedFormat()
          Abstract base class to force parent to supply its date format
static boolean isEBCDIC(java.lang.String type)
          Convinience method to determine if the value of the input string is EBCDIC.
protected static java.lang.String readDate(java.lang.String date, java.text.SimpleDateFormat fmt)
           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.
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  java.lang.String readDateField(java.io.InputStream byteStream, com.bea.wlxt.mfl.MFLField mflField, int dateLength)
          Reads Date file based on encoding
protected static java.lang.String writeDate(java.lang.String date, java.text.SimpleDateFormat fmt)
          Returns a String containing the date to be written.
protected  void writeDateField(BintypeOutputStream byteStream, com.bea.wlxt.mfl.MFLField mflField, java.lang.String value)
          Writes Date file based on encoding
 
Methods inherited from class com.bea.wlxt.bintype.Bintype
applyPadAndTrim, applyPadTrimAndTruncate, canBeDataDelimited, canBeDelimited, canBeDelimSeparator, canBeFieldType, canBeLenFieldType, canBePadded, canBePassLiteral, canBeTagFieldType, canBeTrimmed, canBeTruncated, canHaveDecimalPlaces, getBinaryBytes, getDescriptionText, getDisplayName, getTypeName, isCodepageOK, isCutoffRequired, isDateType, isFixedSize, isValueOK, makeString, read, readDataDelim, 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

readDateField

protected java.lang.String readDateField(java.io.InputStream byteStream,
                                         com.bea.wlxt.mfl.MFLField mflField,
                                         int dateLength)
                                  throws BintypeException,
                                         java.io.UnsupportedEncodingException,
                                         java.io.IOException
Reads Date file based on encoding

Parameters:
byteStream - InputStream the input byte stream containing binary data.
mflField - MFLField the MFL field that is currently being read from the input stream.
dateLength - The length of the date in characters
Throws:
BintypeException - If an error occurs reading the input data.

writeDateField

protected void writeDateField(BintypeOutputStream byteStream,
                              com.bea.wlxt.mfl.MFLField mflField,
                              java.lang.String value)
                       throws java.io.UnsupportedEncodingException,
                              java.io.IOException
Writes Date file based on encoding

Parameters:
byteStream - InputStream the input byte stream containing binary data.
mflField - MFLField the MFL field that is currently being read from the input stream.
value - The date to write
Throws:
BintypeException - If an error occurs reading the input data.

readDate

protected static java.lang.String readDate(java.lang.String date,
                                           java.text.SimpleDateFormat fmt)
                                    throws java.lang.Exception
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.

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.

getLocalizedDate

public java.lang.String getLocalizedDate()
                                  throws java.lang.Exception
Generate localized date for testing purposes based on parent classes format

Returns:
Random Date string based on parents format

getLocalizedFormat

public abstract java.text.SimpleDateFormat getLocalizedFormat()
Abstract base class to force parent to supply its date format

isEBCDIC

public static boolean isEBCDIC(java.lang.String type)
Convinience method to determine if the value of the input string is EBCDIC.

Parameters:
type - String

WebLogic Integration

WebLogic Integration (WLI)