OSMQ
v2.0.1

osmq.util
Class FixedLengthRecord

java.lang.Object
  extended byosmq.util.FixedLengthRecord

public class FixedLengthRecord
extends java.lang.Object

Creates a Message or DataRecord from a string that represents a COBOL data record in display format.

Processes COMP-3 (implied decimal) display format.


Field Summary
static char DECIMAL
           
static char INTEGER
           
static char TEXT
           
 
Constructor Summary
FixedLengthRecord()
           
FixedLengthRecord(java.lang.String s)
           
 
Method Summary
 int getFieldsRead()
           
 java.lang.String getImpliedDecimalString(int size, int decimals)
          Trims leading spaces from the resulting string.
 java.lang.String getIntegerString(int size)
          Trims leading spaces from the resulting string.
 java.lang.String getRecordValue()
           
 java.lang.String getText(int size)
           
 java.lang.String getXMLImpliedDecimalString(int size, int decimals)
          Trims leading spaces from the resulting string.
 java.lang.String parse(char type, int size, int decimals)
          Returns the next field based ont the parameter descriptor
 void positionAtFirstField()
           
 void setRecordValue(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DECIMAL

public static final char DECIMAL
See Also:
Constant Field Values

INTEGER

public static final char INTEGER
See Also:
Constant Field Values

TEXT

public static final char TEXT
See Also:
Constant Field Values
Constructor Detail

FixedLengthRecord

public FixedLengthRecord()

FixedLengthRecord

public FixedLengthRecord(java.lang.String s)
Method Detail

positionAtFirstField

public final void positionAtFirstField()

getFieldsRead

public final int getFieldsRead()

setRecordValue

public final void setRecordValue(java.lang.String s)

getRecordValue

public final java.lang.String getRecordValue()

getImpliedDecimalString

public final java.lang.String getImpliedDecimalString(int size,
                                                      int decimals)
Trims leading spaces from the resulting string. Decimal of (4, 2) is returned as 9999.99


getXMLImpliedDecimalString

public final java.lang.String getXMLImpliedDecimalString(int size,
                                                         int decimals)
Trims leading spaces from the resulting string. Decimal of (4, 2) is returned as 9999.99


getIntegerString

public final java.lang.String getIntegerString(int size)
Trims leading spaces from the resulting string.


parse

public java.lang.String parse(char type,
                              int size,
                              int decimals)
Returns the next field based ont the parameter descriptor


getText

public final java.lang.String getText(int size)

(c) 2000 - 2003 MQue Systems
All Rights Reserved