Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void writeMap(org.neo4j.io.fs.StoreChannel channel, java.util.Map<String, java.util.Map<String, String>> map) throws java.io.IOException
        private void WriteMap(StoreChannel channel, IDictionary <string, IDictionary <string, string> > map)
        {
            IoPrimitiveUtils.writeInt(channel, Buffer(4), map.Count);
            foreach (KeyValuePair <string, IDictionary <string, string> > entry in map.SetOfKeyValuePairs())
            {
                WriteString(channel, entry.Key);
                WriteInt(channel, entry.Value.size());
                foreach (KeyValuePair <string, string> propertyEntry in entry.Value.entrySet())
                {
                    WriteString(channel, propertyEntry.Key);
                    WriteString(channel, propertyEntry.Value);
                }
            }
        }
Esempio n. 2
0
        private void Write(File file)
        {
            StoreChannel channel = null;

            try
            {
                channel = _fileSystem.open(file, OpenMode.READ_WRITE);
                channel.WriteAll(ByteBuffer.wrap(_magic));
                IoPrimitiveUtils.writeInt(channel, Buffer(4), VERSION);
                WriteMap(channel, _nodeConfig);
                WriteMap(channel, _relConfig);
                channel.Force(false);
            }
            catch (IOException e)
            {
                throw new Exception(e);
            }
            finally
            {
                Close(channel);
            }
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void writeInt(org.neo4j.io.fs.StoreChannel channel, int value) throws java.io.IOException
        private void WriteInt(StoreChannel channel, int value)
        {
            IoPrimitiveUtils.writeInt(channel, Buffer(4), value);
        }