public override string ToString() { return("Credential{" + "salt=0x" + HexString.encodeHexString(_salt) + ", passwordHash=0x" + HexString.encodeHexString(_passwordHash) + '}'); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static void readStore(org.neo4j.io.fs.FileSystemAbstraction fileSystem, org.neo4j.kernel.impl.store.RecordStore store, long fromId, long toId, java.util.regex.Pattern pattern) throws java.io.IOException private static void ReadStore(FileSystemAbstraction fileSystem, RecordStore store, long fromId, long toId, Pattern pattern) { toId = Math.Min(toId, store.HighId); using (StoreChannel channel = fileSystem.Open(store.StorageFile, OpenMode.READ)) { int recordSize = store.RecordSize; ByteBuffer buf = ByteBuffer.allocate(recordSize); for (long i = fromId; i <= toId; i++) { buf.clear(); long offset = recordSize * i; int count = channel.Read(buf, offset); if (count == -1) { break; } sbyte[] bytes = new sbyte[count]; buf.clear(); buf.get(bytes); string hex = HexString.encodeHexString(bytes); int paddingNeeded = (recordSize * 2 - Math.Max(count * 2, 0)) + 1; string format = "%s %6s 0x%08X %s%" + paddingNeeded + "s%s%n"; string str; string use; try { AbstractBaseRecord record = RecordStore.getRecord(store, i, CHECK); use = record.InUse() ? "+" : "-"; str = record.ToString(); } catch (InvalidRecordException) { str = StringHelper.NewString(bytes, 0, count, "ASCII"); use = "?"; } if (pattern == null || pattern.matcher(str).find()) { _console.printf(format, use, i, offset, hex, " ", str); } } } }