From 67df28467307382addaf0b963c7ab7233d640979 Mon Sep 17 00:00:00 2001 From: Alberto Fernandez Date: Wed, 6 Dec 2017 15:20:10 +0100 Subject: [PATCH] Fix javadoc --- .../org/mozilla/universalchardet/ReaderFactory.java | 13 +++++++++++-- .../universalchardet/UnicodeBOMInputStream.java | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/mozilla/universalchardet/ReaderFactory.java b/src/main/java/org/mozilla/universalchardet/ReaderFactory.java index 339c416..e44d7c2 100644 --- a/src/main/java/org/mozilla/universalchardet/ReaderFactory.java +++ b/src/main/java/org/mozilla/universalchardet/ReaderFactory.java @@ -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 { @@ -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 diff --git a/src/main/java/org/mozilla/universalchardet/UnicodeBOMInputStream.java b/src/main/java/org/mozilla/universalchardet/UnicodeBOMInputStream.java index 9700c6b..275dc48 100644 --- a/src/main/java/org/mozilla/universalchardet/UnicodeBOMInputStream.java +++ b/src/main/java/org/mozilla/universalchardet/UnicodeBOMInputStream.java @@ -15,13 +15,13 @@ * *

The * Unicode FAQ - * defines 5 types of BOMs:

* *

Use the {@link #getBOM()} method to know whether a BOM has been detected * or not. @@ -83,6 +83,7 @@ public final String toString() { /** * Returns the bytes corresponding to this BOM value. + * @return the bytes corresponding to this BOM value. */ public final byte[] getBytes() { final int length = bytes.length;