Java Doc for ByteArrayParser.java in  » J2EE » Sofia » com » salmonllc » parser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Sofia » com.salmonllc.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.salmonllc.parser.ByteArrayParser

ByteArrayParser
public class ByteArrayParser (Code)
This object is used to describe a byte array representing column data in fixed locations.
The Byte Array is a representation of a cobol copy book.


Field Summary
final public static  intTYPE_CHAR
    
final public static  intTYPE_CUSTOM
    
final public static  intTYPE_DATE_CCYYMMDD
    
final public static  intTYPE_DATE_MMDDCCYY
    
final public static  intTYPE_DATE_MMYY
    
final public static  intTYPE_DATE_YYMM
    
final public static  intTYPE_DOUBLE
    
final public static  intTYPE_FLOAT
    
final public static  intTYPE_INT
    
final public static  intTYPE_STRING
    
final public static  intTYPE_TIME_HHMMSS
    

Constructor Summary
public  ByteArrayParser(byte[] baOutputMessage, int iNumColumns)
     Allocates a new ByteArrayParser object from a byte[] and a specified number of columns.
public  ByteArrayParser(byte[] baOutputMessage, int[] datalengths, int[] datastartindexes, int[] datatypes, boolean[] datasigned, String[] datacolumnnames, CustomType[] datacustomtypes, int[] dataprecisions)
     Allocates a new ByteArrayParser object from a byte[] and arrays of the attributes describing the columns.
public  ByteArrayParser(byte[] baOutputMessage, int[] datalengths, int[] datastartindexes, int[] datatypes, boolean[] datasigned, String[] datacolumnnames, CustomType[] datacustomtypes, int[] dataprecisions, boolean[] dataredefined)
     Allocates a new ByteArrayParser object from a byte[] and arrays of the attributes describing the columns.

Method Summary
public  voidaddColumnDefinition(int iColumnNumber, String sColumnName, int iType, int iStartIndex, int iLength, boolean bSigned)
     To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(int iColumnNumber,String sColumnName,int iType,int iStartIndex,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row.
public  voidaddColumnDefinition(int iColumnNumber, String sColumnName, CustomType ctType, int iStartIndex, int iLength, boolean bSigned)
     To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(int iColumnNumber,String sColumnName,CustomType ctType,int iStartIndex,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row.
public  voidaddColumnDefinition(int iColumnNumber, String sColumnName, int iType, int iPrecision, int iStartIndex, int iLength, boolean bSigned)
     To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(int iColumnNumber,String sColumnName,int iType,int iStartIndex,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row.
public  voidaddColumnDefinition(String sColumnName, int iType, int iLength, boolean bSigned)
     To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(String sColumnName,int iType,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  iType - Specifies the Format Type of Column.Valid values range 1-7.
public  voidaddColumnDefinition(String sColumnName, CustomType ctType, int iLength, boolean bSigned)
     To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(String sColumnName,CustomType ctType,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row.
public  voidaddColumnDefinition(String sColumnName, int iType, int iPrecision, int iLength, boolean bSigned)
     To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(String sColumnName,int iType,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  iType - Specifies the Format Type of Column.
public  voidaddRedefinedColumnDefinition(String sRedefineName, int iType, int iPrecision, String sStartColumnName, String sEndColumnName, boolean bSigned)
     To add a redefined column definition to a ByteArrayParser.

 Method: public void addRedefinedColumnDefinition(String sRedefineName,int iType,int iPrecision,String sStartColumnName,String sEndColumnName,boolean bSigned) throws ArrayIndexOutOfBoundsException,ParserException
 Visibility: Public
 Purpose:	To specify a redefined column definition to be in used parsing the data
 contained in message.
 


Parameters:
  sRedefineName - Specifies Name for the redefined column.
Parameters:
  iType - Specifies the Format Type of Column.
public  voidaddRedefinedColumnDefinition(String sRedefineName, int iType, String sStartColumnName, String sEndColumnName, boolean bSigned)
     To add a redefined column definition to a ByteArrayParser.

 Method: public void addRedefinedColumnDefinition(String sRedefineName,int iType,String sStartColumnName,String sEndColumnName,boolean bSigned) throws ArrayIndexOutOfBoundsException,ParserException
 Visibility: Public
 Purpose:	To specify a redefined column definition to be in used parsing the data
 contained in message.
 


Parameters:
  sRedefineName - Specifies Name for the redefined column.
Parameters:
  iType - Specifies the Format Type of Column.
public  voidaddRedefinedColumnDefinition(String sRedefineName, CustomType cType, String sStartColumnName, String sEndColumnName, boolean bSigned)
     To add a redefined column definition to a ByteArrayParser.
public  VectordoParse()
     To perofrm the parsing of a ByteArrayParser.

 Method: public Vector doParse() throws Exception
 Visibility: Public
 Purpose:	To return a row in the message, each call returns the next row
 in message if more than one.
 

Returns A Vector containing the data of one row in the message.
public  intgetColumnCount()
     To return the number of columns in a ByteArrayParser.
public  intgetColumnIndex(String sProperty)
     A function to get the column index of a specified column in ByteArrayParser.
public  StringgetColumnName(int iColumn)
     To get the column name of a specified column number in a ByteArrayParser.
public  intgetColumnStartPosition(String sProperty)
     A function to get the start index of a specified column in ByteArrayParser.
public  intgetColumnType(int iColumn)
     To get the column type of a specified column in a ByteArrayParser.
public  String[]getDataColumnNames()
     To return an array of names of the columns in a ByteArrayParser.
public  CustomType[]getDataCustomTypes()
     To return an array of the custom type representation of the columns in a ByteArrayParser.
public  int[]getDataLengths()
     To return an array of lengths of the columns in a ByteArrayParser.
public  int[]getDataPrecisions()
     To return an array of precisions of the columns in a ByteArrayParser.
public  boolean[]getDataSigned()
     To return an array of signed attributes of the columns in a ByteArrayParser.
public  int[]getDataStartIndexes()
     To return an array of start indexes of the columns in a ByteArrayParser.
public  int[]getDataTypes()
     To return an array of types of the columns in a ByteArrayParser.
public  intgetLength(String sProperty)
    
public  byte[]getMessage()
     To get the byte array of a ByteArrayParser.
public  ObjectgetObject(String sProperty)
     To get an object representation of a column from a specified column in a ByteArrayParser.

 Method: public Object getObject(String sProperty) throws Exception
 Visibility: Public
 Purpose:	To get the object value of a column from a parsed object.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to get the value of.
public  ObjectgetObject(int iColumn)
     To get an object representation of a column from a specified column in a ByteArrayParser.

 Method: public Object getObject(int iColumn) throws Exception
 Visibility: Public
 Purpose:	To get the object value of a column from a parsed object.
 


Parameters:
  iColumn - Specifies the index of the that you wish to get the value of.
public  intgetPrecision(int iColumn)
     To get a column precision of a specified column in a ByteArrayParser.

 Method: public int getPrecision(int iColumn)
 Visibility: Public
 Purpose:	To return the precision of a specified column.
 


Parameters:
  iColumn - Specifies the Column Number.
public  intgetPrecision(String sProperty)
     To get a column precision of a specified column in a ByteArrayParser.

 Method: public int getPrecision(String sProperty)
 Visibility: Public
 Purpose:	To return the precision of a specified column.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to get the value of.
public  intgetSqlColumnType(int iColumn)
     To get the column type of a specified column in a ByteArrayParser.
public  StringgetValue(String sProperty)
     To get the bytes of a column as a string from a specified column in a ByteArrayParser.

 Method: public String getValue(String sProperty) throws Exception
 Visibility: Public
 Purpose:	To get the value of a column from a parsed object.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to get the value of.
public  voidnextOffset()
    
public  voidnextRow()
    
final public static  StringpadString(String sPassed, int iPadLength, char cPadChar)
     A static function to pad to the end of a string.

 Method: public final static String padString(String sPassed,int iPadLength,char cPadChar)
 Visibility: Public
 Purpose:	To pad a String with a specified character.
 


Parameters:
  sPassed - Specifies the String to be Padded at End.
Parameters:
  iPadLength - Specifies the final length of the padded string.
final public static  StringpadStringInFront(String sPassed, int iPadLength, char cPadChar)
     A static function to pad to the beginning of a string.

 Method: public final static String padStringInFront(String sPassed,int iPadLength,char cPadChar)
 Visibility: Public
 Purpose:	To pad a String with a specified character.
 


Parameters:
  sPassed - Specifies the String to be Padded in front.
Parameters:
  iPadLength - Specifies the final length of the padded string.
public  voidreset()
     To clear out all the stored parsed values in a ByteArrayParser, so that it can be parsed again.
public  voidsetDataColumnNames(String[] datacolumnnames)
     To set the column names of the columns in a ByteArrayParser.
public  voidsetDataCustomTypes(CustomType[] datacustomtypes)
     To set the data custom types of the columns in a ByteArrayParser.
public  voidsetDataLengths(int[] datalengths)
     To set the data lengths of the columns in a ByteArrayParser.
public  voidsetDataPrecisions(int[] dataprecisions)
     To set the data precisions of the columns in a ByteArrayParser.
public  voidsetDataSigned(boolean[] datasigned)
     To set the data signed attributes of the columns in a ByteArrayParser.
public  voidsetDataStartIndexes(int[] datastartindexes)
     To set the data start index of the columns in a ByteArrayParser.
public  voidsetDataTypes(int[] datatypes)
     To set the data types of the columns in a ByteArrayParser.
public  voidsetMultiRow(int iRowLength)
     To set the ByteArrayParser to multirow.

 Method: public void setMultiRow(int iRowLength) throws Exception
 Visibility: Public
 Purpose:	To indicate message contains multiple rows and optionally the
 length of a row.
public  voidsetObject(String sProperty, Object oValue)
     To set a column with an object for a specified column in a ByteArrayParser.
public  voidsetValue(String sProperty, String sValue)
     To set the bytes of a column from a string for a specified column in a ByteArrayParser.

Field Detail
TYPE_CHAR
final public static int TYPE_CHAR(Code)



TYPE_CUSTOM
final public static int TYPE_CUSTOM(Code)



TYPE_DATE_CCYYMMDD
final public static int TYPE_DATE_CCYYMMDD(Code)



TYPE_DATE_MMDDCCYY
final public static int TYPE_DATE_MMDDCCYY(Code)



TYPE_DATE_MMYY
final public static int TYPE_DATE_MMYY(Code)



TYPE_DATE_YYMM
final public static int TYPE_DATE_YYMM(Code)



TYPE_DOUBLE
final public static int TYPE_DOUBLE(Code)



TYPE_FLOAT
final public static int TYPE_FLOAT(Code)



TYPE_INT
final public static int TYPE_INT(Code)



TYPE_STRING
final public static int TYPE_STRING(Code)



TYPE_TIME_HHMMSS
final public static int TYPE_TIME_HHMMSS(Code)




Constructor Detail
ByteArrayParser
public ByteArrayParser(byte[] baOutputMessage, int iNumColumns)(Code)
Allocates a new ByteArrayParser object from a byte[] and a specified number of columns.

 Constructor: ByteArrayParser(byte[] baOutputMessage,int iNumColumns)
 Visibility: Public
 


Parameters:
  baOutputMessage - This is the message containing a row or multiple rows.
Parameters:
  iNumColumns - Specifies the number of Columns in a row.



ByteArrayParser
public ByteArrayParser(byte[] baOutputMessage, int[] datalengths, int[] datastartindexes, int[] datatypes, boolean[] datasigned, String[] datacolumnnames, CustomType[] datacustomtypes, int[] dataprecisions)(Code)
Allocates a new ByteArrayParser object from a byte[] and arrays of the attributes describing the columns.

 Constructor: ByteArrayParser(byte[] baOutputMessage,int[] datalengths,int[] datastartindexes,int[] datatypes,boolean[] datasigned,String[] datacolumnnames,CustomType[] datacustomtypes,int[] dataprecisions)
 Visibility: Public
 


Parameters:
  baOutputMessage - This is the message containing a row or multiple rows.
Parameters:
  datalengths - This is an array of the lengths for the columns.
Parameters:
  datastartindexes - This is an array of the start indexes for the columns.
Parameters:
  datatypes - This is an array of the types for the columns.
Parameters:
  datasigned - This is an array of the signed attribute for the columns.
Parameters:
  datacolumnnames - This is an array of the column names for the columns.
Parameters:
  datacustomtypes - This is an array of the custom type representations for the columns.
Parameters:
  dataprecisions - This is an array of the precisions for the columns.



ByteArrayParser
public ByteArrayParser(byte[] baOutputMessage, int[] datalengths, int[] datastartindexes, int[] datatypes, boolean[] datasigned, String[] datacolumnnames, CustomType[] datacustomtypes, int[] dataprecisions, boolean[] dataredefined)(Code)
Allocates a new ByteArrayParser object from a byte[] and arrays of the attributes describing the columns.

 Constructor: ByteArrayParser(byte[] baOutputMessage,int[] datalengths,int[] datastartindexes,int[] datatypes,boolean[] datasigned,String[] datacolumnnames,CustomType[] datacustomtypes,int[] dataprecisions)
 Visibility: Public
 


Parameters:
  baOutputMessage - This is the message containing a row or multiple rows.
Parameters:
  datalengths - This is an array of the lengths for the columns.
Parameters:
  datastartindexes - This is an array of the start indexes for the columns.
Parameters:
  datatypes - This is an array of the types for the columns.
Parameters:
  datasigned - This is an array of the signed attribute for the columns.
Parameters:
  datacolumnnames - This is an array of the column names for the columns.
Parameters:
  datacustomtypes - This is an array of the custom type representations for the columns.
Parameters:
  dataprecisions - This is an array of the precisions for the columns.
Parameters:
  dataredefined - This is an array of the redefined attribute for the columns.




Method Detail
addColumnDefinition
public void addColumnDefinition(int iColumnNumber, String sColumnName, int iType, int iStartIndex, int iLength, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(int iColumnNumber,String sColumnName,int iType,int iStartIndex,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row.
Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  iType - Specifies the Format Type of Column. Valid values range 1-7. Public Constants exist for these values.
Parameters:
  iStartIndex - Specifies the start index of a Column in Row portion of the message.
Parameters:
  iLength - Specifies the length of a Column in a Row portion of the message.
Parameters:
  bSigned - Indicates in Columns data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If iColumnNumber is greater than specified number of Columns.Circumstance 2: If iStartIndex plus iLength is greater than length of Message.


exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance 1: If Calculated Row Length is Greater than Specified Row Length.




addColumnDefinition
public void addColumnDefinition(int iColumnNumber, String sColumnName, CustomType ctType, int iStartIndex, int iLength, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(int iColumnNumber,String sColumnName,CustomType ctType,int iStartIndex,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row. If Negative it uses last known column position + 1;
Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  ctType - Specifies an instance of an object that implements CustomType Format of Column.
Parameters:
  iStartIndex - Specifies the start index of a Column in Row portion of the message.
Parameters:
  iLength - Specifies the length of a Column in a Row portion of the message.
Parameters:
  bSigned - Indicates in Columns data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If iColumnNumber is greater than specified number of Columns.Circumstance 2: If iStartIndex plus iLength is greater than length of Message.


exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance 1: If Calculated Row Length is Greater than Specified Row Length.




addColumnDefinition
public void addColumnDefinition(int iColumnNumber, String sColumnName, int iType, int iPrecision, int iStartIndex, int iLength, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(int iColumnNumber,String sColumnName,int iType,int iStartIndex,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row.
Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  iType - Specifies the Format Type of Column. Valid values range 1-7. Public Constants exist for these values.
Parameters:
  iPrecision - Specifies the precison of the Float date.
Parameters:
  iStartIndex - Specifies the start index of a Column in Row portion of the message.
Parameters:
  iLength - Specifies the length of a Column in a Row portion of the message.
Parameters:
  bSigned - Indicates in Columns data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If iColumnNumber is greater than specified number of Columns.Circumstance 2: If iStartIndex plus iLength is greater than length of Message.


exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance 1: If Calculated Row Length is Greater than Specified Row Length.




addColumnDefinition
public void addColumnDefinition(String sColumnName, int iType, int iLength, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(String sColumnName,int iType,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  iType - Specifies the Format Type of Column.Valid values range 1-7. Public Constants exist for these values.
Parameters:
  iLength - Specifies the length of a Column in a Row portion of the message.
Parameters:
  bSigned - Indicates in Columns data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If iColumnNumber is greater than specified number of Columns.Circumstance 2: If iStartIndex plus iLength is greater than length of Message.


exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance 1: If Calculated Row Length is Greater than Specified Row Length.




addColumnDefinition
public void addColumnDefinition(String sColumnName, CustomType ctType, int iLength, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(String sColumnName,CustomType ctType,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  iColumnNumber - Specifies Column position in a Row. If Negative it uses last known column position + 1;
Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  ctType - Specifies an instance of an object that implements CustomType Format of Column.
Parameters:
  iStartIndex - Specifies the start index of a Column in Row portion of the message.
Parameters:
  iLength - Specifies the length of a Column in a Row portion of the message.
Parameters:
  bSigned - Indicates in Columns data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If iColumnNumber is greater than specified number of Columns.Circumstance 2: If iStartIndex plus iLength is greater than length of Message.


exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance 1: If Calculated Row Length is Greater than Specified Row Length.




addColumnDefinition
public void addColumnDefinition(String sColumnName, int iType, int iPrecision, int iLength, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a column definition to a ByteArrayParser.

 Method: public void addColumnDefinition(String sColumnName,int iType,int iLength,boolean bSigned) throws ArrayIndexOutOfBoundsException,Exception
 Visibility: Public
 Purpose:	To specify a column definition to be in used parsing the data 
 contained in message.
 


Parameters:
  sColumnName - Specifies Name of Column.
Parameters:
  iType - Specifies the Format Type of Column. Valid values range 1-7. Public Constants exist for these values.
Parameters:
  iPrecision - Specifies the precison of the Float date.
Parameters:
  iLength - Speifies the length of a Column in a Row portion of the message.
Parameters:
  bSigned - Indicates in Columns data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If iColumnNumber is greater than specified number of Columns.Circumstance 2: If iStartIndex plus iLength is greater than length of Message.


exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance 1: If Calculated Row Length is Greater than Specified Row Length.




addRedefinedColumnDefinition
public void addRedefinedColumnDefinition(String sRedefineName, int iType, int iPrecision, String sStartColumnName, String sEndColumnName, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a redefined column definition to a ByteArrayParser.

 Method: public void addRedefinedColumnDefinition(String sRedefineName,int iType,int iPrecision,String sStartColumnName,String sEndColumnName,boolean bSigned) throws ArrayIndexOutOfBoundsException,ParserException
 Visibility: Public
 Purpose:	To specify a redefined column definition to be in used parsing the data
 contained in message.
 


Parameters:
  sRedefineName - Specifies Name for the redefined column.
Parameters:
  iType - Specifies the Format Type of Column. Valid values range 1-7. Public Constants exist for these values.
Parameters:
  iPrecision - Specifies the precison of the Float date.
Parameters:
  sStartColumnName - Specifies the start column of the redefined field.
Parameters:
  sEndColumnName - Specifies the end column of the redefined field.
Parameters:
  bSigned - Indicates the Column data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws Exception under this Circumstance.Circumstance 1: If this new column is greater than specified number of Columns.


exception:
  ParserException -

Throw Exception under this Circumstance.Circumstance 1: If the Specified Start & End Columns do not exist.




addRedefinedColumnDefinition
public void addRedefinedColumnDefinition(String sRedefineName, int iType, String sStartColumnName, String sEndColumnName, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a redefined column definition to a ByteArrayParser.

 Method: public void addRedefinedColumnDefinition(String sRedefineName,int iType,String sStartColumnName,String sEndColumnName,boolean bSigned) throws ArrayIndexOutOfBoundsException,ParserException
 Visibility: Public
 Purpose:	To specify a redefined column definition to be in used parsing the data
 contained in message.
 


Parameters:
  sRedefineName - Specifies Name for the redefined column.
Parameters:
  iType - Specifies the Format Type of Column. Valid values range 1-7. Public Constants exist for these values.
Parameters:
  sStartColumnName - Specifies the start column of the redefined field.
Parameters:
  sEndColumnName - Specifies the end column of the redefined field.
Parameters:
  bSigned - Indicates the Column data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws Exception under this Circumstance.Circumstance 1: If this new column is greater than specified number of Columns.


exception:
  ParserException -

Throw Exception under this Circumstance.Circumstance 1: If the Specified Start & End Columns do not exist.




addRedefinedColumnDefinition
public void addRedefinedColumnDefinition(String sRedefineName, CustomType cType, String sStartColumnName, String sEndColumnName, boolean bSigned) throws ArrayIndexOutOfBoundsException, ParserException(Code)
To add a redefined column definition to a ByteArrayParser.

 Method: public void addRedefinedColumnDefinition(String sRedefineName,int iType,int iPrecision,String sStartColumnName,String sEndColumnName,boolean bSigned) throws ArrayIndexOutOfBoundsException,ParserException
 Visibility: Public
 Purpose:	To specify a redefined column definition to be in used parsing the data
 contained in message.
 


Parameters:
  sRedefineName - Specifies Name for the redefined column.
Parameters:
  cType - Specifies the Custom Type of Column.
Parameters:
  sStartColumnName - Specifies the start column of the redefined field.
Parameters:
  sEndColumnName - Specifies the end column of the redefined field.
Parameters:
  bSigned - Indicates the Column data is signed.
exception:
  ArrayIndexOutOfBoundsException -

Throws Exception under this Circumstance.Circumstance 1: If this new column is greater than specified number of Columns.


exception:
  ParserException -

Throw Exception under this Circumstance.Circumstance 1: If the Specified Start & End Columns do not exist.




doParse
public Vector doParse() throws ParserException(Code)
To perofrm the parsing of a ByteArrayParser.

 Method: public Vector doParse() throws Exception
 Visibility: Public
 Purpose:	To return a row in the message, each call returns the next row
 in message if more than one.
 

Returns A Vector containing the data of one row in the message. Null indicates last row reached.
exception:
  Exception -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If no Column Definitions have been defined. Circumstance 2: If Specified Row Length does not divide Evenly into Length of Message.




getColumnCount
public int getColumnCount()(Code)
To return the number of columns in a ByteArrayParser.

 Method: public int getColumnCount()
 Visibility: Public
 Purpose:	To return the number of column in a row.
 

Returns the number of columns in a row.



getColumnIndex
public int getColumnIndex(String sProperty) throws ParserException(Code)
A function to get the column index of a specified column in ByteArrayParser.

 Method: public int getColumnIndex(String sProperty) throws ParserException
 Visibility: Public
 Purpose:	To get the column index of the specified column.
 


Parameters:
  sProperty - Specifies the column to get the index of.
exception:
  Exception -

Throws an Exception under this Circumstance.Circumstance: If the column specified does not exist.

Returns the index of the specified column.



getColumnName
public String getColumnName(int iColumn)(Code)
To get the column name of a specified column number in a ByteArrayParser.

 Method: public String getColumnName(int iColumn)
 Visibility: Public
 Purpose:	To return the name of a column.
 


Parameters:
  iColumn - Specifies the Column Number. Returns the name assigned to a specific column.



getColumnStartPosition
public int getColumnStartPosition(String sProperty) throws ParserException(Code)
A function to get the start index of a specified column in ByteArrayParser.

 Method: public int getColumnStartPosition(String sProperty) throws ParserException
 Visibility: Public
 Purpose:	To get the start index of the specified column.
 


Parameters:
  sProperty - Specifies the column to get the start index of.
exception:
  Exception -

Throws an Exception under this Circumstance.Circumstance: If the column specified does not exist.

Returns the index of the specified column.



getColumnType
public int getColumnType(int iColumn)(Code)
To get the column type of a specified column in a ByteArrayParser.

 Method: public int getColumnType(int iColumn)
 Visibility: Public
 Purpose:	To return the column type of a specified column.
 


Parameters:
  iColumn - Specifies the Column Number. Returns the sql type of the specified column.



getDataColumnNames
public String[] getDataColumnNames()(Code)
To return an array of names of the columns in a ByteArrayParser.

 Method: public int getDataColumnNames()
 Visibility: Public
 Purpose:	To return an array of names of the columns.
 

Returns the name of the columns in an array.



getDataCustomTypes
public CustomType[] getDataCustomTypes()(Code)
To return an array of the custom type representation of the columns in a ByteArrayParser.

 Method: public int getDataCustomTypes()
 Visibility: Public
 Purpose:	To return an array of custom types of the columns.
 

Returns the custom type of the columns in an array.



getDataLengths
public int[] getDataLengths()(Code)
To return an array of lengths of the columns in a ByteArrayParser.

 Method: public int getDataLengths()
 Visibility: Public
 Purpose:	To return an array of lengths of the columns.
 

Returns the length of the columns in an array.



getDataPrecisions
public int[] getDataPrecisions()(Code)
To return an array of precisions of the columns in a ByteArrayParser.

 Method: public int getDataPrecisions()
 Visibility: Public
 Purpose:	To return an array of precisions of the columns.
 

Returns the precisions of the columns in an array.



getDataSigned
public boolean[] getDataSigned()(Code)
To return an array of signed attributes of the columns in a ByteArrayParser.

 Method: public int getDataSigned()
 Visibility: Public
 Purpose:	To return an array of signed attribute of the columns.
 

Returns the signed attribute of the columns in an array.



getDataStartIndexes
public int[] getDataStartIndexes()(Code)
To return an array of start indexes of the columns in a ByteArrayParser.

 Method: public int getDataStartIndexes()
 Visibility: Public
 Purpose:	To return an array of start indexes of the columns.
 

Returns the start index of the columns in an array.



getDataTypes
public int[] getDataTypes()(Code)
To return an array of types of the columns in a ByteArrayParser.

 Method: public int getDataTypes()
 Visibility: Public
 Purpose:	To return an array of types of the columns.
 

Returns the type of the columns in an array.



getLength
public int getLength(String sProperty) throws ParserException(Code)



getMessage
public byte[] getMessage()(Code)
To get the byte array of a ByteArrayParser.

 Method: public byte[] getMessage()
 Visibility: Public
 Purpose:	To get the byte[] message of a parsed object.
 

Returns the byte[] of the message.



getObject
public Object getObject(String sProperty) throws ParserException(Code)
To get an object representation of a column from a specified column in a ByteArrayParser.

 Method: public Object getObject(String sProperty) throws Exception
 Visibility: Public
 Purpose:	To get the object value of a column from a parsed object.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to get the value of. Returns the value of the specified column as an Object.
exception:
  Exception -

Throws two possible Exception under this Circumstance.Circumstance: If doParse method was never called.Circumstance: If the property/column specified does not exist.




getObject
public Object getObject(int iColumn) throws ParserException(Code)
To get an object representation of a column from a specified column in a ByteArrayParser.

 Method: public Object getObject(int iColumn) throws Exception
 Visibility: Public
 Purpose:	To get the object value of a column from a parsed object.
 


Parameters:
  iColumn - Specifies the index of the that you wish to get the value of. Returns the value of the specified column as an Object.
exception:
  Exception -

Throws two possible Exception under this Circumstance.Circumstance: If doParse method was never called.Circumstance: If the column index specified is out of bounds.




getPrecision
public int getPrecision(int iColumn)(Code)
To get a column precision of a specified column in a ByteArrayParser.

 Method: public int getPrecision(int iColumn)
 Visibility: Public
 Purpose:	To return the precision of a specified column.
 


Parameters:
  iColumn - Specifies the Column Number. Returns the precision of the specified column.



getPrecision
public int getPrecision(String sProperty) throws ParserException(Code)
To get a column precision of a specified column in a ByteArrayParser.

 Method: public int getPrecision(String sProperty)
 Visibility: Public
 Purpose:	To return the precision of a specified column.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to get the value of. Returns the precision of the specified column.
exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance: If the property/column specified does not exist.




getSqlColumnType
public int getSqlColumnType(int iColumn)(Code)
To get the column type of a specified column in a ByteArrayParser.

 Method: public int getSqlColumnType(int iColumn)
 Visibility: Public
 Purpose:	To return the sql type of a specified column.
 


Parameters:
  iColumn - Specifies the Column Number. Returns the sql type of the specified column.



getValue
public String getValue(String sProperty) throws ParserException(Code)
To get the bytes of a column as a string from a specified column in a ByteArrayParser.

 Method: public String getValue(String sProperty) throws Exception
 Visibility: Public
 Purpose:	To get the value of a column from a parsed object.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to get the value of. Returns the value of the specified column.
exception:
  Exception -

Throws one possible Exception under this Circumstance.Circumstance: If the property/column specified does not exist.




nextOffset
public void nextOffset()(Code)



nextRow
public void nextRow()(Code)



padString
final public static String padString(String sPassed, int iPadLength, char cPadChar)(Code)
A static function to pad to the end of a string.

 Method: public final static String padString(String sPassed,int iPadLength,char cPadChar)
 Visibility: Public
 Purpose:	To pad a String with a specified character.
 


Parameters:
  sPassed - Specifies the String to be Padded at End.
Parameters:
  iPadLength - Specifies the final length of the padded string. char cPadChar Specifies the character to pad string with. Returns the padded string.



padStringInFront
final public static String padStringInFront(String sPassed, int iPadLength, char cPadChar)(Code)
A static function to pad to the beginning of a string.

 Method: public final static String padStringInFront(String sPassed,int iPadLength,char cPadChar)
 Visibility: Public
 Purpose:	To pad a String with a specified character.
 


Parameters:
  sPassed - Specifies the String to be Padded in front.
Parameters:
  iPadLength - Specifies the final length of the padded string. char cPadChar Specifies the character to pad string with. Returns the padded string.



reset
public void reset()(Code)
To clear out all the stored parsed values in a ByteArrayParser, so that it can be parsed again.

 Method: public void reset()
 Visibility: Public
 Purpose:	To clear the stored parsed values such that parsing will reoccur.
 




setDataColumnNames
public void setDataColumnNames(String[] datacolumnnames)(Code)
To set the column names of the columns in a ByteArrayParser.

 Method: public void setDataColumnNames(String[] datacolumnnames)
 Visibility: Public
 Purpose:	To set the names of the columns in the ByteArrayParser.
 


Parameters:
  datalengths - Sets the column name of the columns in a ByteArrayParser.



setDataCustomTypes
public void setDataCustomTypes(CustomType[] datacustomtypes)(Code)
To set the data custom types of the columns in a ByteArrayParser.

 Method: public void setDataCustomTypes(CustomType[] datacustomtypes)
 Visibility: Public
 Purpose:	To set the custom types of the columns in the ByteArrayParser.
 


Parameters:
  datalengths - Sets the data custom type of the columns in a ByteArrayParser.



setDataLengths
public void setDataLengths(int[] datalengths)(Code)
To set the data lengths of the columns in a ByteArrayParser.

 Method: public void setDataLengths(int[] datalengths)
 Visibility: Public
 Purpose:	To set the lengths of the columns in the ByteArrayParser.
 


Parameters:
  datalengths - Sets the data length of the columns in a ByteArrayParser.



setDataPrecisions
public void setDataPrecisions(int[] dataprecisions)(Code)
To set the data precisions of the columns in a ByteArrayParser.

 Method: public void setDataPrecisions(int[] dataprecisions)
 Visibility: Public
 Purpose:	To set the precisions of the columns in the ByteArrayParser.
 


Parameters:
  datalengths - Sets the data precision of the columns in a ByteArrayParser.



setDataSigned
public void setDataSigned(boolean[] datasigned)(Code)
To set the data signed attributes of the columns in a ByteArrayParser.

 Method: public void setDataSigned(boolean[] datasigned)
 Visibility: Public
 Purpose:	To set the signed attributes of the columns in the ByteArrayParser.
 


Parameters:
  datalengths - Sets the data signed attribute of the columns in a ByteArrayParser.



setDataStartIndexes
public void setDataStartIndexes(int[] datastartindexes)(Code)
To set the data start index of the columns in a ByteArrayParser.

 Method: public void setDataStartIndexes(int[] datastartindexes)
 Visibility: Public
 Purpose:	To set the start indexes of the columns in the ByteArrayParser.
 


Parameters:
  datalengths - Sets the data start index of the columns in a ByteArrayParser.



setDataTypes
public void setDataTypes(int[] datatypes)(Code)
To set the data types of the columns in a ByteArrayParser.

 Method: public void setDataTypes(int[] datatypes)
 Visibility: Public
 Purpose:	To set the types of the columns in the ByteArrayParser.
 


Parameters:
  datalengths - Sets the data type of the columns in a ByteArrayParser.



setMultiRow
public void setMultiRow(int iRowLength) throws ParserException(Code)
To set the ByteArrayParser to multirow.

 Method: public void setMultiRow(int iRowLength) throws Exception
 Visibility: Public
 Purpose:	To indicate message contains multiple rows and optionally the
 length of a row. An iRowLength of zero indicates to calculate
 Column Definitions.
 


Parameters:
  iRowLength - Specifies the length of a row. If zero Row Length Automatically Calculated from Column Definitions.
exception:
  ParserException -

Throws two possible Exceptions under these Circumstances.Circumstance 1: If Calculated Row Length is Greater than Specified Row Length.Circumstance 2: If Specified Row Length does not divide Evenly into Length of Message.




setObject
public void setObject(String sProperty, Object oValue) throws ParserException(Code)
To set a column with an object for a specified column in a ByteArrayParser.

 Method: public void setObject(String sProperty,Object oValue) throws Exception
 Visibility: Public
 Purpose:	To set the value of a column in a parsed object.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to set the value of.
exception:
  Exception -

Throws five possible Exception under these Circumstances.Circumstance 1: If the property/column specified does not exist.Circumstance 2: If the length of the values being passed is not equal to the required column length for String objects.Circumstance 3: If doParse has not been called.Circumstance 4: If the object passed is null.Circumstance 5: If the value of an Integer or Float type is not within its min/max range determined by its length.




setValue
public void setValue(String sProperty, String sValue) throws ParserException(Code)
To set the bytes of a column from a string for a specified column in a ByteArrayParser.

 Method: public void setValue(String sProperty,String sValue) throws Exception
 Visibility: Public
 Purpose:	To set the value of a column in a parsed object.
 


Parameters:
  sProperty - Specifies the property/Column that you wish to set the value of.
Parameters:
  sValue - Specifies the value you want to set to a particular property/Column.
exception:
  Exception -

Throws two possible Exception under these Circumstances.Circumstance 1: If the property/column specified does not exist.Circumstance 2: If the length of the values being passed is not equal to the required column length.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.