//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private org.neo4j.kernel.impl.store.record.RelationshipTypeTokenRecord readRelationshipTypeTokenRecord(int id, org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException private RelationshipTypeTokenRecord ReadRelationshipTypeTokenRecord(int id, ReadableChannel channel) { // in_use(byte)+type_blockId(int)+nr_type_records(int) sbyte inUseFlag = channel.Get(); bool inUse = false; if ((inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue()) { inUse = true; } else if (inUseFlag != Record.NOT_IN_USE.byteValue()) { throw new IOException("Illegal in use flag: " + inUseFlag); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord(id); record.InUse = inUse; record.NameId = channel.Int; int nrTypeRecords = channel.Int; for (int i = 0; i < nrTypeRecords; i++) { DynamicRecord dr = ReadDynamicRecord(channel); if (dr == null) { return(null); } record.AddNameRecord(dr); } return(record); }
private RelationshipTypeTokenRecord CreateRelationshipTypeTokenRecord(int id) { RelationshipTypeTokenRecord relationshipTypeTokenRecord = new RelationshipTypeTokenRecord(id); relationshipTypeTokenRecord.InUse = true; relationshipTypeTokenRecord.NameId = 333; relationshipTypeTokenRecord.AddNameRecord(new DynamicRecord(43)); return(relationshipTypeTokenRecord); }