garydgregory commented on a change in pull request #291:
URL: https://github.com/apache/commons-io/pull/291#discussion_r747770070
##########
File path: src/main/java/org/apache/commons/io/input/ReaderInputStream.java
##########
@@ -129,6 +128,9 @@ public ReaderInputStream(final Reader reader) {
* Constructs a new {@link ReaderInputStream} with a default input buffer
size of {@value #DEFAULT_BUFFER_SIZE}
* characters.
*
+ * <p>The encoder created for the specified charset will use {@link
CodingErrorAction#REPLACE} for malformed input
+ * and unmappable characters.
+ *
Review comment:
Close HTML tags.
##########
File path: src/main/java/org/apache/commons/io/input/ReaderInputStream.java
##########
@@ -156,6 +161,9 @@ public ReaderInputStream(final Reader reader, final Charset
charset, final int b
/**
* Constructs a new {@link ReaderInputStream}.
*
+ * <p>This constructor does not call {@link CharsetEncoder#reset() reset}
on the provided encoder. The caller
+ * of this constructor should do this when providing an encoder which had
already been in use.
+ *
Review comment:
Close HTML tags.
##########
File path: src/main/java/org/apache/commons/io/input/ReaderInputStream.java
##########
@@ -185,6 +196,9 @@ public ReaderInputStream(final Reader reader, final
CharsetEncoder charsetEncode
* Constructs a new {@link ReaderInputStream} with a default input buffer
size of {@value #DEFAULT_BUFFER_SIZE}
* characters.
*
+ * <p>The encoder created for the specified charset will use {@link
CodingErrorAction#REPLACE} for malformed input
+ * and unmappable characters.
+ *
Review comment:
Close HTML tags.
##########
File path: src/main/java/org/apache/commons/io/input/ReaderInputStream.java
##########
@@ -195,6 +209,9 @@ public ReaderInputStream(final Reader reader, final String
charsetName) {
/**
* Constructs a new {@link ReaderInputStream}.
*
+ * <p>The encoder created for the specified charset will use {@link
CodingErrorAction#REPLACE} for malformed input
+ * and unmappable characters.
+ *
Review comment:
Close HTML tags.
##########
File path: src/main/java/org/apache/commons/io/input/ReaderInputStream.java
##########
@@ -213,6 +230,16 @@ public void close() throws IOException {
reader.close();
}
+ /**
+ * The implementation by {@link ReaderInputStream} always returns 0.
+ */
+ @Override
+ public int available() throws IOException {
+ // Could implement this using Reader.ready(), but would be rather
cumbersome
+ // and probably not very efficient
+ return 0;
+ }
+
Review comment:
This PR is only supposed to be about docs as stated in the PR title.
Furthermore this change is not matched with a unit test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]