Example #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void writePem(String type, byte[] encodedContent, java.io.File path) throws java.io.IOException
        private void WritePem(string type, sbyte[] encodedContent, File path)
        {
            path.ParentFile.mkdirs();
            using (PemWriter writer = new PemWriter(new StreamWriter(path)))
            {
                writer.writeObject(new PemObject(type, encodedContent));
                writer.flush();
            }
            path.setReadable(false, false);
            path.setWritable(false, false);
            path.Readable = true;
            path.Writable = true;
        }