public void setTags(Vector<DegreeValue> tags) {
   if (write_extended_info) {
     // remove existing tags
     int s = 1;
     String identifier = TagUtil.getTagTagId(s).toUpperCase();
     while (tag.hasField(identifier)) {
       tag.set(new OggTagField(identifier, ""));
       ++s;
       identifier = TagUtil.getTagTagId(s).toUpperCase();
     }
     // set tags
     for (s = 0; s < tags.size(); ++s) {
       String tagName = tags.get(s).getName();
       float degree = tags.get(s).getPercentage();
       identifier = TagUtil.getTagTagId(s + 1);
       tag.set(new OggTagField(identifier.toUpperCase(), tagName));
       identifier = TagUtil.getTagTagDegree(s + 1);
       tag.set(new OggTagField(identifier.toUpperCase(), String.valueOf(degree)));
     }
   }
 }
 public void setRemix(String remix) {
   if (write_extended_info) {
     tag.set(new OggTagField(TAG_REMIX.toUpperCase(), remix));
   }
 }
 public void setRating(int rating) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_RATING.toUpperCase(), String.valueOf(rating)));
   }
 }
 public void setPublisher(String publisher) {
   if (write_extended_info) {
     tag.set(new OggTagField(TAG_PUBLISHER.toUpperCase(), publisher));
   }
 }
 public void setBpmEnd(float end_bpm) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_BPM_END.toUpperCase(), String.valueOf(end_bpm)));
   }
 }
 public void setBeatIntensity(int beat_intensity) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_BEAT_INTENSITY.toUpperCase(), String.valueOf(beat_intensity)));
   }
 }
 public void setTimeSignature(String time_sig) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_TIME_SIGNATURE.toUpperCase(), time_sig));
   }
 }
 public void setKey(String key) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_INITIALKEY.toUpperCase(), key));
     tag.set(new OggTagField(TXXX_KEY.toUpperCase(), key));
   }
 }
 public void setEncodedBy(String encoded_by) {
   if (write_extended_info) {
     tag.set(new OggTagField(TAG_ENCODED_BY.toUpperCase(), encoded_by));
   }
 }
 public void setFileType(String file_type) {
   if (write_extended_info) {
     tag.set(new OggTagField(TAG_FILE_TYPE.toUpperCase(), file_type));
   }
 }
 public void setContentType(String content_type) {
   if (write_extended_info) {
     tag.set(new OggTagField(TAG_CONTENT_TYPE.toUpperCase(), content_type));
   }
 }
 public void setContentGroupDescription(String content_group_description) {
   if (write_extended_info) {
     tag.set(
         new OggTagField(TAG_CONTENT_GROUP_DESCRIPTION.toUpperCase(), content_group_description));
   }
 }
 public void setComments(String comments) {
   if (tag != null) {
     tag.setComment(comments);
     tag.set(new OggTagField(TAG_COMMENTS.toUpperCase(), comments));
   }
 }
 public void setReplayGain(float value) {
   if (write_extended_info) {
     tag.set(
         new OggTagField(TXXX_REPLAYGAIN_TRACK_GAIN.toUpperCase(), String.valueOf(value) + " dB"));
   }
 }
 public void setKeyAccuracy(int accuracy) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_KEY_ACCURACY.toUpperCase(), String.valueOf(accuracy)));
   }
 }
 public void setSizeInBytes(int size) {
   if (write_extended_info) {
     tag.set(new OggTagField(TAG_SIZE_IN_BYTES.toUpperCase(), String.valueOf(size)));
   }
 }
 public void setKeyStart(String start_key) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_KEY_START.toUpperCase(), start_key));
   }
 }
 public void setTime(String time) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_TIME.toUpperCase(), time));
   }
 }
 public void setKeyEnd(String end_key) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_KEY_END.toUpperCase(), end_key));
   }
 }
 public void setUserField(String fieldName, String user1) {
   if (write_extended_info) {
     tag.set(new OggTagField(TagUtil.convertToValidTagId(fieldName), user1));
   }
 }
 public void setLanguages(String languages) {
   if (write_extended_info) {
     tag.set(new OggTagField(TAG_LANGUAGES.toUpperCase(), languages));
   }
 }
 public void setBpm(int bpm) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_BPM.toUpperCase(), String.valueOf(bpm)));
   }
 }
 public void setBpmStart(float start_bpm) {
   if (write_extended_info) {
     tag.set(new OggTagField(TXXX_BPM_START.toUpperCase(), String.valueOf(start_bpm)));
   }
 }