com.knowgate.misc
Class FLVParser

java.lang.Object
  extended by com.knowgate.misc.LINParser
      extended by com.knowgate.misc.FLVParser

public class FLVParser
extends LINParser

Fixed Length Columns Text Parser

Parses a text file with fixed length columns into a memory array


Constructor Summary
FLVParser()
           
FLVParser(java.lang.String sCharSetName)
          Create Fixed Length Value Parser and set encoding to be used
 
Method Summary
 int errorLine()
           
 int getColumnCount()
          Get column count
 int getColumnPosition(java.lang.String sColumnName)
           
 java.lang.String getField(int iCol, int iRow)
           
 java.lang.String getField(java.lang.String sCol, int iRow)
           
 void parseFile(java.io.File oInFile, java.lang.String sFileDescriptor)
           
 
Methods inherited from class com.knowgate.misc.LINParser
charSet, charSet, getLine, getLineCount, parseFile, parseFile, parseStream, parseString, splitLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FLVParser

public FLVParser()

FLVParser

public FLVParser(java.lang.String sCharSetName)
Create Fixed Length Value Parser and set encoding to be used

Parameters:
sCharSetName - Name of charset encoding
Method Detail

getColumnCount

public int getColumnCount()
Get column count

Returns:
int

getColumnPosition

public int getColumnPosition(java.lang.String sColumnName)
Parameters:
sColumnName - Column Name
Returns:
Zero based index for column position or -1 if column was not found.

errorLine

public int errorLine()

parseFile

public void parseFile(java.io.File oInFile,
                      java.lang.String sFileDescriptor)
               throws java.io.FileNotFoundException,
                      java.io.IOException,
                      java.lang.NumberFormatException,
                      java.lang.ArrayIndexOutOfBoundsException,
                      java.lang.RuntimeException,
                      java.lang.NullPointerException,
                      java.lang.IllegalArgumentException
Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.NumberFormatException
java.lang.ArrayIndexOutOfBoundsException
java.lang.RuntimeException
java.lang.NullPointerException
java.lang.IllegalArgumentException

getField

public java.lang.String getField(int iCol,
                                 int iRow)
                          throws java.lang.IllegalStateException,
                                 java.lang.ArrayIndexOutOfBoundsException,
                                 java.lang.StringIndexOutOfBoundsException
Throws:
java.lang.IllegalStateException
java.lang.ArrayIndexOutOfBoundsException
java.lang.StringIndexOutOfBoundsException

getField

public java.lang.String getField(java.lang.String sCol,
                                 int iRow)
                          throws java.lang.IllegalStateException,
                                 java.lang.ArrayIndexOutOfBoundsException,
                                 java.lang.StringIndexOutOfBoundsException
Throws:
java.lang.IllegalStateException
java.lang.ArrayIndexOutOfBoundsException
java.lang.StringIndexOutOfBoundsException