Writes some comment.
<P>
This method writes some comment.

@param comment   the comment that has to be written
@throws  IOException
7661
protected void writeComment(String comment) throws IOException {
        addTabs(2);
        os.write(BEGINCOMMENT);
        write(comment);
        os.write(ENDCOMMENT);
    }
224416
public void setCommentFrame(String description, String comment)
	{
		try
		{
			byte[] b = new byte[description.length() + comment.length() + 5];
			int bytesCopied = 0;
			b[bytesCopied++] = 0;
			b[bytesCopied++] = 'e';
			b[bytesCopied++] = 'n';
			b[bytesCopied++] = 'g';
			System.arraycopy(description.getBytes(ENC_TYPE), 0, b, bytesCopied, description.length());
			bytesCopied += description.length();
			b[bytesCopied++] = 0;
			System.arraycopy(comment.getBytes(ENC_TYPE), 0, b, bytesCopied, comment.length());
			bytesCopied += comment.length();

			updateFrameData(ID3v2Frames.COMMENTS, b);
		}
		catch (UnsupportedEncodingException e)
		{
			e.printStackTrace();
		}
	}
926836
@SuppressWarnings("deprecation")
	@Override
	public void save(final OutputStream out, final String comments) {
		lock.readLock().lock();
		try {
			properties.save(out, comments);
		} finally {
			lock.readLock().unlock();
		}
	}
103797
public void write(WritableByteChannel channel) throws IOException {
        logger.debug("Writing> {}", this);
        for (Field field : fields) {
            field.write(channel);
        }
    }
763617
public static void write(final String data, final Writer output) throws IOException {
		if (data != null) {
			output.write(data);
		}
	}
387755
public void logComment(String message) throws IOException
   {
      if (reportContext.get() != null)
      {
         reportContext.get().addComment(message);
      }
      else
      {
         writeMessage(message);
      }
   }
847920
@Override
	public void store(final Writer writer, final String comments) throws IOException {
		lock.readLock().lock();
		try {
			properties.store(writer, comments);
		} finally {
			lock.readLock().unlock();
		}
	}
321339
public void setComment(String comment) {
        if (comment != null) {
            this.comment = zc.getBytes(comment);
            if (this.comment.length > 0xffff)
                throw new IllegalArgumentException("ZIP file comment too long.");
        }
    }
650163
public void addComment(String comment) throws IOException {
		prepareToAddChildNode();
		SXCommentNode commentNode = new SXCommentNode(comment, writer, 0, tabString);
		lastChildNode = commentNode;
	}
10489
@Override
	public void write(final OutputStream output) throws IOException
	{
		initialize();
		if (content == null)
		{
			content = new byte[0];
		}
		output.write(content, 0, content.length);
		output.flush();
	}
126328
@Override
    public void write(DataOutput out) throws IOException {
        out.writeInt(contentType.ordinal());
        if (content != null) {
            WritableUtils.writeVInt(out, content.length);
            out.write(content, 0, content.length);
        } else if (is != null) {
            content = new byte[MAX_BUFFER_SIZE];
            int len = 0;
            while ((len = is.read(content)) > 0) {
                out.write(content, 0, len);
            }
        }      
    }
1331935
private static void printComments(String comment) {
    int index = 0;
    int nextIndex = 154;
    while(index < comment.length()) {
      nextIndex = nextIndex <= comment.length() ? nextIndex : comment.length();
      String commentSegment = comment.substring(index, nextIndex);
      int lastSpace = commentSegment.lastIndexOf(' ');
      int lastNewLine = commentSegment.indexOf('\n');
      char lastChar = ' ';
      if(nextIndex < comment.length() ) {
        lastChar = comment.charAt(nextIndex);
      }
      if(lastNewLine > 0) {
        nextIndex = index + lastNewLine;
        commentSegment = comment.substring(index, nextIndex);
      } else
      if(Character.isWhitespace(lastChar)) {
        
      } else
      if(lastSpace > 0) {
        nextIndex = index + lastSpace;
        commentSegment = comment.substring(index, nextIndex);
      }
      System.out.println("  " + commentSegment);
      index = nextIndex;
      if(lastNewLine > 0 || lastSpace > 0) {
        index++;
      }
      nextIndex = index + 154;
    }
  }
1145789
void writeJavadocComment(String methodComment, Writer writer) throws IOException {
		// From javadoc
		if (methodComment != null) {
			methodComment = methodComment.split("@")[0];
			int lastIndexOf = methodComment.lastIndexOf("\n");
			if (lastIndexOf >= 0) {
				methodComment = methodComment.substring(0, lastIndexOf);
			}
			String comment = methodComment.replaceAll("\n", CR+TAB2+" *");
			writer.append(TAB2).append(" *").append(comment).append(CR);
		}
	}
698860
public void addComment(String tag, String comment) {
        String nt = normaliseTag(tag);
        if(! comments.containsKey(nt)) {
            comments.put(nt, new ArrayList<String>());
        }
        comments.get(nt).add(comment);
    }
1306690
@Override
  public void write(JsonWriter writer, SpeechWordConfidence speechWordConfidence) throws IOException {
    writer.beginArray();

    writer.value(speechWordConfidence.getWord());
    writer.value(speechWordConfidence.getConfidence());

    writer.endArray();
    writer.flush();
  }
746441
@Override
	public void storeToXML(final OutputStream os, final String comment) throws IOException {
		lock.readLock().lock();
		try {
			properties.storeToXML(os, comment);
		} finally {
			lock.readLock().unlock();
		}
	}
1004989
private static void writeStream(final InputStream input, final FileWriter writer)
            throws IOException
    {
        writeStream(input, writer, LineEndingStyle.LOCAL);
    }