public virtual void newRecord(DDMCallbackEvent @event, DDMDataBuffer dataBuffer) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final byte[] data = dataBuffer.getRecordDataBuffer(); sbyte[] data = dataBuffer.RecordDataBuffer; string line = Conv.ebcdicByteArrayToString(data, 0, data.Length, charBuffer_); if (skip_ == 1) { int index = line.IndexOf(":", StringComparison.Ordinal); if (index > 0) { int end = line.IndexOf("System name", index, StringComparison.Ordinal); if (end > index) { elapsedTime_ = line.Substring(index + 1, (end - index) - (index + 1)).Trim(); } } ++skip_; } else if (skip_ < 4) { ++skip_; } else if (!theEnd_) { if (line.IndexOf("E N D O F L I S T I N G", StringComparison.Ordinal) >= 0) { theEnd_ = true; } else { StringTokenizer st = new StringTokenizer(line); string unit = nextToken(st); string type = nextToken(st); string sizeMB = nextToken(st); string percentUsed = nextToken(st); string ioRequests = nextToken(st); string requestSizeKB = nextToken(st); string readRequests = nextToken(st); string writeRequests = nextToken(st); string readKB = nextToken(st); string writeKB = nextToken(st); string percentBusy = nextToken(st); string asp = nextToken(st); string protectionType = nextToken(st); string protectionStatus = nextToken(st); string compression = nextToken(st); DiskStatus ds = new DiskStatus(unit, type, sizeMB, percentUsed, ioRequests, requestSizeKB, readRequests, writeRequests, readKB, writeKB, percentBusy, asp, protectionType, protectionStatus, compression); statuses_.Add(ds); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void newRecord(DDMCallbackEvent event, DDMDataBuffer dataBuffer) throws IOException public void newRecord(DDMCallbackEvent @event, DDMDataBuffer dataBuffer) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final byte[] data = dataBuffer.getRecordDataBuffer(); sbyte[] data = dataBuffer.RecordDataBuffer; string userName = rf_.getField("UPUPRF").getString(data); string userClass = rf_.getField("UPUSCL").getString(data); string passwordExpired = rf_.getField("UPPWEX").getString(data); long maxStorage = rf_.getField("UPMXST").getLong(data); long storageUsed = rf_.getField("UPMXSU").getLong(data); string description = rf_.getField("UPTEXT").getString(data); string locked = rf_.getField("UPUPLK").getString(data); string damaged = rf_.getField("UPUPDM").getString(data); string status = rf_.getField("UPSTAT").getString(data); long uid = rf_.getField("UPUID").getLong(data); long gid = rf_.getField("UPGID").getLong(data); UserInfo ui = new UserInfo(userName, userClass, passwordExpired, maxStorage, storageUsed, description, locked, damaged, status, uid, gid); // users_.addElement(ui); uiListener_.newUserInfo(ui); }
internal DDMFile(string library, string file, string member, sbyte[] recordFormatName, sbyte[] 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 < numBuffers; ++i) { buffers_[i] = new DDMDataBuffer(recordLength_, recordIncrement_ - recordLength_ + 2, recordIncrement_ - nullFieldOffset); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void newRecord(DDMCallbackEvent event, DDMDataBuffer dataBuffer) throws IOException public virtual void newRecord(DDMCallbackEvent @event, DDMDataBuffer dataBuffer) { newRecord(dataBuffer.RecordNumber, dataBuffer.RecordDataBuffer, dataBuffer.NullFieldValues); }