Class IDPolicyWriter

java.lang.Object
org.incenp.obofoundry.dicer.IDPolicyWriter

public class IDPolicyWriter extends Object
A class to serialise an ID policy to file.
  • Constructor Details

    • IDPolicyWriter

      public IDPolicyWriter()
  • Method Details

    • write

      public void write(IDPolicy policy, String filename) throws IOException
      Writes a policy to a file.
      Parameters:
      policy - The policy to write.
      filename - The name of the file to write the policy to.
      Throws:
      IOException - If any I/O error occurs when attempting to write to the file.
    • write

      public void write(IDPolicy policy, File file) throws IOException
      Writes a policy to a file.
      Parameters:
      policy - The policy to write.
      file - The file to write the policy to.
      Throws:
      IOException - If any I/O error occurs when attempting to write to the file.
    • write

      public void write(IDPolicy policy, OutputStream stream) throws IOException
      Writes a policy to a stream.
      Parameters:
      policy - The policy to write.
      stream - The stream to write the policy to.
      Throws:
      IOException - If any I/O error occurs when attempting to write to the stream.
    • write

      public void write(IDPolicy policy, Writer writer) throws IOException
      Writes a policy to a Writer object.
      Parameters:
      policy - The policy to write.
      writer - The writer object to write the policy to.
      Throws:
      IOException - If any I/O error occurs when attempting to write to the writer object.