All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jtopenlite.com.ibm.jtopenlite.ddm.DDMFile Maven / Gradle / Ivy

There is a newer version: 20.0.7
Show newest version
///////////////////////////////////////////////////////////////////////////////
//
// JTOpenLite
//
// Filename:  DDMFile.java
//
// The source code contained herein is licensed under the IBM Public License
// Version 1.0, which has been approved by the Open Source Initiative.
// Copyright (C) 2011-2012 International Business Machines Corporation and
// others.  All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////

package com.ibm.jtopenlite.ddm;


/**
 * Represents a handle to a file.
**/
public final class DDMFile
{
  public static final int READ_ONLY = 0;
  public static final int WRITE_ONLY = 1;
  public static final int READ_WRITE = 2;

  private final String library_;
  private final String file_;
  private final String member_;
  private final byte[] recordFormatName_;
  private final byte[] dclNam_;
  private final int openType_;
  private final int recordLength_;
  private final int recordIncrement_;
  private final int batchSize_;
  private final int nullFieldByteMapOffset_;
  private final DDMDataBuffer[] buffers_;
  private final DDMCallbackEvent eventBuffer_;

  DDMFile(String library, String file, String member, byte[] recordFormatName,
          byte[] dclName, int openType, int recLength, int recInc, int batchSize, int nullFieldOffset, int numBuffers)
  {
    library_ = library;
    file_ = file;
    member_ = member;
    recordFormatName_ = recordFormatName;
    dclNam_ = dclName;
    openType_ = openType;
    recordLength_ = recLength;
    recordIncrement_ = recInc;
    batchSize_ = batchSize;
    nullFieldByteMapOffset_ = nullFieldOffset;
    eventBuffer_ = new DDMCallbackEvent(this);

    numBuffers = numBuffers <= 0 ? 1 : numBuffers;

    buffers_ = new DDMDataBuffer[numBuffers];
    for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy