public void writeTag(String tag,Font value){
  startTag(tag);
  writeTag("name",value.getName());
  int style=value.getStyle();
  if ((style & Font.BOLD) != 0 && (style & Font.ITALIC) != 0) {
    writeTag(STYLE,"BOLDITALIC");
  }
 else   if ((style & Font.BOLD) != 0) {
    writeTag(STYLE,"BOLD");
  }
 else   if ((style & Font.ITALIC) != 0) {
    writeTag(STYLE,"ITALIC");
  }
 else {
    writeTag(STYLE,"PLAIN");
  }
  writeTag("size",value.getSize());
  closeTag();
}

public void writeTag ( String tag , Font value ) { startTag ( tag ) ; writeTag ( "name" , value . getName ( ) ) ; int style = value . getStyle ( ) ; if ( ( style & Font . BOLD ) != 0 && ( style & Font . ITALIC ) != 0 ) { writeTag ( STYLE , "BOLDITALIC" ) ; } else if ( ( style & Font . BOLD ) != 0 ) { writeTag ( STYLE , "BOLD" ) ; } else if ( ( style & Font . ITALIC ) != 0 ) { writeTag ( STYLE , "ITALIC" ) ; } else { writeTag ( STYLE , "PLAIN" ) ; } writeTag ( "size" , value . getSize ( ) ) ; closeTag ( ) ; }
writes & lt ; tag & gt ; value & lt ; / tag & gt ; to output stream
