WebLogic Integration


com.bea.wlxt.bintype
Class BintypeString

java.lang.Object
  |
  +--com.bea.wlxt.bintype.Bintype
        |
        +--com.bea.wlxt.bintype.BintypeString
Direct Known Subclasses:
BintypeString_Binary, BintypeString_BinaryHex, BintypeString_CString, BintypeString_EBCDIC, BintypeString_Filler, BintypeString_Numeric, BintypeString_String

public abstract class BintypeString
extends Bintype

This class provides the default implementation for Data Types used by the WLXT to translate Binary String Data to XML or XML data to Binary String 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
BintypeString()
           
 
Method Summary
 boolean canBeDelimited()
          Returns true if this type allows delimiters to mark the end of the field.
 boolean canBeFieldType()
          Returns true if this type can be used to describe an MFL field.
 boolean canBeLenFieldType()
          Returns true if this type can be used to specify a fields length.
 boolean canBeTagFieldType()
          Returns true if this type can be used as a tag for binary data.
 boolean isCodepageOK()
          Returns true if you may specify the codepage.
 boolean isCutoffRequired()
          Returns true if this type requires a cutoff date.
 boolean isDateType()
          Returns true if this type is a Date type.
 boolean isFixedSize()
          Returns true if this type has a type specified size.
 boolean isValueOK()
          Defaults to false for String types.
protected  java.lang.String makeString(byte[] data, com.bea.wlxt.mfl.MFLField mflField)
          Creates and returns a String from the binary byte array.
protected  byte[] readByteField(java.io.InputStream byteStream, com.bea.wlxt.mfl.MFLField mflField)
           
protected  byte[] readDelimitedStringField(java.io.InputStream byteStream, com.bea.wlxt.mfl.MFLField mflField)
          Reads data from the input stream until encountering delimiter for this field.
protected  byte[] readField(java.io.InputStream byteStream, com.bea.wlxt.mfl.MFLField mflField)
          Creates and returns a byte array containing data for the specified MFL field.
protected  java.lang.String trimBoth(java.lang.String data, char trimChar)
          Trims specific characters from both ends of the String data
protected  java.lang.String trimLeading(java.lang.String data, char trimChar)
          Trims specific characters from the leading end of the String data
protected  java.lang.String trimTrailing(java.lang.String data, char trimChar)
          Trims specific characters from the trailing end of the String data
protected  void writeField(BintypeOutputStream byteStream, com.bea.wlxt.mfl.MFLField mflField, java.lang.String value, java.lang.String codepage)
          Writes String data to the output stream for the specified MFL Field
 
Methods inherited from class com.bea.wlxt.bintype.Bintype
applyPadAndTrim, applyPadTrimAndTruncate, canBeDataDelimited, canBeDelimSeparator, canBePadded, canBePassLiteral, canBeTrimmed, canBeTruncated, canHaveDecimalPlaces, getBinaryBytes, getDescriptionText, getDisplayName, getTypeName, 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

BintypeString

public BintypeString()
Method Detail

makeString

protected java.lang.String makeString(byte[] data,
                                      com.bea.wlxt.mfl.MFLField mflField)
                               throws BintypeException
Creates and returns a String from the binary byte array.

Parameters:
data - byte[] the input binary data byte array.
mflField - MFLField the MFL field that is currently being read from the input stream.
Throws:
BintypeException - If an error occurs reading the input data.

readField

protected byte[] readField(java.io.InputStream byteStream,
                           com.bea.wlxt.mfl.MFLField mflField)
                    throws BintypeException
Creates and returns a byte array containing data for the specified MFL field.

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

readDelimitedStringField

protected byte[] readDelimitedStringField(java.io.InputStream byteStream,
                                          com.bea.wlxt.mfl.MFLField mflField)
                                   throws BintypeException
Reads data from the input stream until encountering delimiter for this field.

Parameters:
byteStream - BintypeOutputStream the output stream that contains binary data
fld - MFLField the MFL field that is currently being written to the output stream. This field may or may not require the length to be specified
fldLen - int the length of the field data.
Throws:
BintypeException - If an error occurs reading the input data.

readByteField

protected byte[] readByteField(java.io.InputStream byteStream,
                               com.bea.wlxt.mfl.MFLField mflField)
                        throws BintypeException

writeField

protected void writeField(BintypeOutputStream byteStream,
                          com.bea.wlxt.mfl.MFLField mflField,
                          java.lang.String value,
                          java.lang.String codepage)
                   throws BintypeException
Writes String data to the output stream for the specified MFL Field

Parameters:
byteStream - BintypeOutputStream the output byte stream containing binary data.
mflField - MFLField the MFL field that is currently being written to the output stream.
value - String a String containing the data value to be written to output stream.
codepage - String the name of the codepage used to format the data value.
Throws:
BintypeException - If an error occurs writing output data.

trimBoth

protected java.lang.String trimBoth(java.lang.String data,
                                    char trimChar)
Trims specific characters from both ends of the String data

Parameters:
data - String input String data.
trimChar - specific character to be trimmed from either end of input String data.

trimLeading

protected java.lang.String trimLeading(java.lang.String data,
                                       char trimChar)
Trims specific characters from the leading end of the String data

Parameters:
data - String input String data.
trimChar - specific character to be trimmed from the beginning of input String data.

trimTrailing

protected java.lang.String trimTrailing(java.lang.String data,
                                        char trimChar)
Trims specific characters from the trailing end of the String data

Parameters:
data - String input String data.
trimChar - specific character to be trimmed from the end of input String data.

canBeFieldType

public boolean canBeFieldType()
Returns true if this type can be used to describe an MFL field. Defaults to true for String types.

Overrides:
canBeFieldType in class Bintype

canBeLenFieldType

public boolean canBeLenFieldType()
Returns true if this type can be used to specify a fields length. Defaults to false for String types.

Overrides:
canBeLenFieldType in class Bintype

canBeTagFieldType

public boolean canBeTagFieldType()
Returns true if this type can be used as a tag for binary data. Defaults to true for String types.

Overrides:
canBeTagFieldType in class Bintype

canBeDelimited

public boolean canBeDelimited()
Returns true if this type allows delimiters to mark the end of the field. Defaults to true for String types.

Overrides:
canBeDelimited in class Bintype

isFixedSize

public boolean isFixedSize()
Returns true if this type has a type specified size. Defaults to false for String types.

Overrides:
isFixedSize in class Bintype

isDateType

public boolean isDateType()
Returns true if this type is a Date type. Defaults to false for String types.

Overrides:
isDateType in class Bintype

isCutoffRequired

public boolean isCutoffRequired()
Returns true if this type requires a cutoff date. Defaults to false for String types

Overrides:
isCutoffRequired in class Bintype

isCodepageOK

public boolean isCodepageOK()
Returns true if you may specify the codepage. Defaults to true for String types.

Overrides:
isCodepageOK in class Bintype

isValueOK

public boolean isValueOK()
Defaults to false for String types.

Overrides:
isValueOK in class Bintype

WebLogic Integration

WebLogic Integration (WLI)