Fixed File Write (소스코드)

고정(Fixed)된 길이의 형태로 파일을 소스코드로 작성하여 Write할 경우 사용한다.

private FixedFileWriter<MSmpMultiFileWriteBtch02Dto> empInfoFixedWriter;

public void open(ExecutionContext executionContext) throws ItemStreamException {
    ……
    String empInfoFixedFileName = "/data1/prod/bxcm/dat/fixed_file_" + oDate + ".txt";
    empInfoFixedWriter= DefaultFileUtils.getFixedFileWriter(empInfoFixedFileName, MSmpMultiFileWriteBtch02Dto.class, "UTF-8");
    empInfoFixedWriter.open(executionContext); // File Open
    ……
}

public void write(List<? extends MSmpMultiFileWriteBtch02Dto> in) throws Exception {
    …
    empInfoFixedWriter.write(mSmpMultiFileWriteBtch02Dtos); // Fixed File Write
}

……

public void update(ExecutionContext executionContext) throws ItemStreamException {
    if(empInfoFixedWriter != null) empInfoFixedWriter.update(executionContext);
}

public void close() throws ItemStreamException {
    if(empInfoFixedWriter != null) empInfoFixedWriter.close();
}
SWLab Bankware Global
  • 전체
  • BXM
  • BXCM
  • BXCP
  • BXI
제품 선택 시 더 정확한 매뉴얼 가이드를 제공해드립니다.

Copyright© Bankwareglobal All Rights Reserved.