public void save(OutputStream os) throws IOException {
  DataOutputStream dos=null;
  try {
    dos=new DataOutputStream(os);
    dos.writeLong(FILE_MAGIC_NUMBER);
    dos.writeInt(FILE_VERSION);
    saveExtensions(criticalExtensions,dos);
    saveExtensions(nonCriticalExtensions,dos);
  }
  finally {
    IOUtils.closeQuietly(dos);
  }
}

public void save ( OutputStream os ) throws IOException { DataOutputStream dos = null ; try { dos = new DataOutputStream ( os ) ; dos . writeLong ( FILE_MAGIC_NUMBER ) ; dos . writeInt ( FILE_VERSION ) ; saveExtensions ( criticalExtensions , dos ) ; saveExtensions ( nonCriticalExtensions , dos ) ; } finally { IOUtils . closeQuietly ( dos ) ; } }
save x . 509 extension set .
