public void initChannel() throws CarbonDataWriterException {
  initFileCount();
  if (this.isInProgressExtrequired) {
    this.fileName=MessageFormat.format(this.fileNameFormat,this.fileCount) + CarbonCommonConstants.FILE_INPROGRESS_STATUS;
    FileData fileData=new FileData(this.fileName,this.storeLocation);
    fileManager.add(fileData);
  }
 else {
    this.fileName=MessageFormat.format(this.fileNameFormat,this.fileCount);
  }
  this.fileCount++;
  try {
    this.fileDataOutStream=FileFactory.getDataOutputStream(this.fileName,FileFactory.getFileType(this.fileName),(short)1);
  }
 catch (  FileNotFoundException fileNotFoundException) {
    throw new CarbonDataWriterException("Problem while getting the writer for Leaf File",fileNotFoundException);
  }
catch (  IOException e) {
    throw new CarbonDataWriterException("Problem while getting the writer for Leaf File",e);
  }
}

public void initChannel ( ) throws CarbonDataWriterException { initFileCount ( ) ; if ( this . isInProgressExtrequired ) { this . fileName = MessageFormat . format ( this . fileNameFormat , this . fileCount ) + CarbonCommonConstants . FILE_INPROGRESS_STATUS ; FileData fileData = new FileData ( this . fileName , this . storeLocation ) ; fileManager . add ( fileData ) ; } else { this . fileName = MessageFormat . format ( this . fileNameFormat , this . fileCount ) ; } this . fileCount ++ ; try { this . fileDataOutStream = FileFactory . getDataOutputStream ( this . fileName , FileFactory . getFileType ( this . fileName ) , ( short ) 1 ) ; } catch ( FileNotFoundException fileNotFoundException ) { throw new CarbonDataWriterException ( "Problem while getting the writer for Leaf File" , fileNotFoundException ) ; } catch ( IOException e ) { throw new CarbonDataWriterException ( "Problem while getting the writer for Leaf File" , e ) ; } }
this method will be used to initialize the channel
