Hi,

When viewing the Javadoc of PrintStream, I noticed that the Javadocs of the constructors involving charsets seems to be a bit lacking. In most cases, these just mention something like "a charset" instead of saying what it's used for. While the class description specifies that, I think it could also be present in the parameter information of the constructors since PrintStream is a commonly used class.

- The second parameter of PrintStream(File, String) is named "csn" and described as "The name of a supported charset". I suggest naming the parameter "encoding" and changing the description to "The name of a supported character encoding to be used for be used for converting characters to bytes" (with the appropriate link). This would be consistent with the PrintStream(OutputStream, boolean, String) constructor. - The second parameter of PrintStream(File, Charset) is described as "A charset". I think this could be changed to "The charset used for converting characters to bytes" or similar. - The third parameter of PrintStream(OutputStream, boolean, String) is named "encoding" and described as "The name of a supported character encoding". This could be changed to "The name of a supported character encoding to be used for be used for converting characters to bytes". - The third parameter of PrintStream(OutputStream, boolean, Charset) is described as "A charset". I suggest changing this to "The charset used for converting characters to bytes".

Instead of using "encoding" for the String parameter names, "charsetName" would be another option. In this case, I would suggest something like "The name of a supported charset to be used for be used for converting characters to bytes".

If wanted, I can write a pull request for this but as I don't have JBS access, I can't create the issue and CSR by myself.

Yours,
Daniel

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to