org.pentaho.di.trans.steps.csvinput
Class CsvInputData
java.lang.Object
org.pentaho.di.trans.step.BaseStepData
org.pentaho.di.trans.steps.csvinput.CsvInputData
- All Implemented Interfaces:
- StepDataInterface
public class CsvInputData
- extends BaseStepData
- implements StepDataInterface
- Since:
- 24-jan-2005
- Author:
- Matt
Method Summary |
boolean |
increaseEndBuffer()
Increase the endBuffer pointer by one.
If there is not enough room in the buffer to go there, resize the byte buffer and read more data.
if there is no more data to read and if the endBuffer pointer has reached the end of the byte buffer, we return true.
|
int |
readBufferFromFile()
|
byte[] |
removeEscapedEnclosures(byte[] field,
int nrEnclosuresFound)
[abcd "" defg] --> [abcd " defg]
[""""] --> [""]
[""] --> ["] |
void |
resizeByteBufferArray()
|
fc
public FileChannel fc
bb
public ByteBuffer bb
convertRowMeta
public RowMetaInterface convertRowMeta
outputRowMeta
public RowMetaInterface outputRowMeta
byteBuffer
public byte[] byteBuffer
startBuffer
public int startBuffer
endBuffer
public int endBuffer
bufferSize
public int bufferSize
delimiter
public byte[] delimiter
enclosure
public byte[] enclosure
preferredBufferSize
public int preferredBufferSize
filenames
public String[] filenames
filenr
public int filenr
startFilenr
public int startFilenr
binaryFilename
public byte[] binaryFilename
fileSize
public long fileSize
fis
public FileInputStream fis
isAddingRowNumber
public boolean isAddingRowNumber
rowNumber
public long rowNumber
stopReading
public boolean stopReading
stepNumber
public int stepNumber
totalNumberOfSteps
public int totalNumberOfSteps
fileSizes
public List<Long> fileSizes
totalFileSize
public long totalFileSize
blockToRead
public long blockToRead
startPosition
public long startPosition
endPosition
public long endPosition
bytesToSkipInFirstFile
public long bytesToSkipInFirstFile
totalBytesRead
public long totalBytesRead
parallel
public boolean parallel
filenameFieldIndex
public int filenameFieldIndex
rownumFieldIndex
public int rownumFieldIndex
encodingType
public EncodingType encodingType
delimiterMatcher
public PatternMatcherInterface delimiterMatcher
enclosureMatcher
public PatternMatcherInterface enclosureMatcher
crLfMatcher
public CrLfMatcherInterface crLfMatcher
CsvInputData
public CsvInputData()
resizeByteBufferArray
public void resizeByteBufferArray()
readBufferFromFile
public int readBufferFromFile()
throws IOException
- Throws:
IOException
increaseEndBuffer
public boolean increaseEndBuffer()
throws IOException
- Increase the endBuffer pointer by one.
If there is not enough room in the buffer to go there, resize the byte buffer and read more data.
if there is no more data to read and if the endBuffer pointer has reached the end of the byte buffer, we return true.
- Returns:
- true if we reached the end of the byte buffer.
- Throws:
IOException
- In case we get an error reading from the input file.
removeEscapedEnclosures
public byte[] removeEscapedEnclosures(byte[] field,
int nrEnclosuresFound)
[abcd "" defg] --> [abcd " defg]
[""""] --> [""]
[""] --> ["]
- Returns:
- the byte array with escaped enclosures escaped.