code: public void writeDefinition(final OutputStream result) throws IOException
      {
      	if(document.getDocumentSettings().isDocumentProtected()) {
  	    	switch(document.getDocumentSettings().getProtectionLevelRaw()) {
  	    	case RtfProtection.LEVEL_FORMPROT:
  	    		result.write(FORMPROT);
  	    		break;
  	    	case RtfProtection.LEVEL_ANNOTPROT:
  	    		result.write(ANNOTPROT);
  	    		break;
  	    	case RtfProtection.LEVEL_REVPROT:
  	    		result.write(REVPROT);
  	    		break;
  	    	case RtfProtection.LEVEL_READPROT:
  	    		result.write(ANNOTPROT);
  	    		result.write(READPROT);
  	    		break;
  	    	}
  	    	result.write(ENFORCEPROT);	// assumes one of the above protection keywords was output.
  	    	result.write((byte)'1');
  	    	result.write(PROTLEVEL);
  	    	result.write(document.getDocumentSettings().getProtectionLevelBytes());
      	}
      	
      	if(document.getDocumentSettings().getReadOnlyRecommended()) {
  	    	result.write(READONLYRECOMMENDED);
  	    	result.write(DELIMITER);
      	}
      }
docs: Writes the RTF protection control words
  @since 2.1.1