Skip to content

Commit

Permalink
Fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
albfernandez committed Dec 6, 2017
1 parent 296a829 commit 67df284
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 11 additions & 2 deletions src/main/java/org/mozilla/universalchardet/ReaderFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ private ReaderFactory() {
* Create a reader from a file with correct encoding
* @param file The file to read from
* @param defaultCharset defaultCharset to use if can't be determined
* @return BufferedReader for the file with the correct encoding
* @throws java.io.IOException if some I/O error ocurrs
*/

public static BufferedReader createBufferedReader(File file, Charset defaultCharset) throws IOException {
Expand All @@ -69,25 +71,32 @@ public static BufferedReader createBufferedReader(File file, Charset defaultChar
* Create a reader from a file with correct encoding. If charset cannot be determined,
* it uses the system default charset.
* @param file The file to read from
* @return BufferedReader for the file with the correct encoding
* @throws java.io.IOException if some I/O error ocurrs
*/
public static BufferedReader createBufferedReader(File file) throws IOException {
return createBufferedReader(file, Charset.defaultCharset());
}

/**
* Create a reader from a file with correct encoding
* Create a reader from a file with the correct encoding
* @param file The file to read from
* @param defaultCharset defaultCharset to use if can't be determined
* @return Reader for the file with the correct encoding
* @throws java.io.IOException if some I/O error ocurrs
* @deprecated Use {@link #createBufferedReader(File, Charset)}
*
*/
@Deprecated
public static Reader createReaderFromFile(File file, Charset defaultCharset) throws IOException {
return createBufferedReader(file, defaultCharset);
}
/**
* Create a reader from a file with correct encoding. If charset cannot be determined,
* Create a reader from a file with the correct encoding. If charset cannot be determined,
* it uses the system default charset.
* @param file The file to read from
* @return Reader for the file with the correct encoding
* @throws java.io.IOException if some I/O error ocurrs
* @deprecated Use {@link #createBufferedReader(File)}
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*
* <p>The
* <a href="http://www.unicode.org/unicode/faq/utf_bom.html">Unicode FAQ</a>
* defines 5 types of BOMs:<ul>
* defines 5 types of BOMs:</p><ul>
* <li><pre>00 00 FE FF = UTF-32, big-endian</pre></li>
* <li><pre>FF FE 00 00 = UTF-32, little-endian</pre></li>
* <li><pre>FE FF = UTF-16, big-endian</pre></li>
* <li><pre>FF FE = UTF-16, little-endian</pre></li>
* <li><pre>EF BB BF = UTF-8</pre></li>
* </ul></p>
* </ul>
*
* <p>Use the {@link #getBOM()} method to know whether a BOM has been detected
* or not.
Expand Down Expand Up @@ -83,6 +83,7 @@ public final String toString() {

/**
* Returns the bytes corresponding to this <code>BOM</code> value.
* @return the bytes corresponding to this <code>BOM</code> value.
*/
public final byte[] getBytes() {
final int length = bytes.length;
Expand Down

0 comments on commit 67df284

Please sign in to comment.