Javadoc warnings
MODIFY
src/main/java/org/apache/commons/io/input/ObservableInputStream.java
src/main/java/org/apache/commons/io/input/ObservableInputStream.java
@@ -72,6 +72,7 @@ public void closed() throws IOException {}
/**
* Called to indicate, that an error occurred on the underlying stream.
+ * @param pException the exception to throw
* @throws IOException if an i/o-error occurs
*/
public void error(final IOException pException) throws IOException { throw pException; }

MODIFY
src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java
src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java
@@ -53,8 +53,6 @@ public CircularBufferInputStream(InputStream pIn, int pBufferSize) {
/** Creates a new instance, which filters the given input stream, and
* uses a reasonable default buffer size (8192).
* @param pIn The input stream, which is being buffered.
- * @param pBufferSize The size of the {@link CircularByteBuffer}, which is
- * used internally.
*/
public CircularBufferInputStream(InputStream pIn) {
this(pIn, 8192);

MODIFY
src/main/java/org/apache/commons/io/input/buffer/CircularByteBuffer.java
src/main/java/org/apache/commons/io/input/buffer/CircularByteBuffer.java
/**
* Creates a new instance with the given buffer size.
+ * @param pSize the size of buffer to create
*/
public CircularByteBuffer(int pSize) {
buffer = new byte[pSize];
@@ -128,9 +129,12 @@ public void add(byte pByte) {
* {@code pBuffer}, {@code pOffset}, and {@code pLength}. No bytes are being
* removed from the buffer. If the result is true, then the following invocations
* of {@link #read()} are guaranteed to return exactly those bytes.
+ * @param pBuffer the buffer to compare against
+ * @param pOffset start offset
+ * @param pLength length to compare
* @return True, if the next invocations of {@link #read()} will return the
* bytes at offsets {@code pOffset}+0, {@code pOffset}+1, ...,
- * @code{pOffset}+@code{pLength}-1 of byte array {@code pBuffer}.
+ * {@code pOffset}+{@code pLength}-1 of byte array {@code pBuffer}.
* @throws IllegalArgumentException Either of {@code pOffset}, or {@code pLength} is negative.
* @throws NullPointerException The byte array {@code pBuffer} is null.
*/
@@ -160,7 +164,10 @@ public boolean peek(byte[] pBuffer, int pOffset, int pLength) {
/**
* Adds the given bytes to the buffer. This is the same as invoking {@link #add(byte)}
* for the bytes at offsets {@code pOffset}+0, {@code pOffset}+1, ...,
- * @code{pOffset}+@code{pLength}-1 of byte array {@code pBuffer}.
+ * {@code pOffset}+{@code pLength}-1 of byte array {@code pBuffer}.
+ * @param pBuffer the buffer to copy
+ * @param pOffset start offset
+ * @param pLength length to copy
* @throws IllegalStateException The buffer doesn't have sufficient space. Use
* {@link #getSpace()} to prevent this exception.
* @throws IllegalArgumentException Either of {@code pOffset}, or {@code pLength} is negative.
@@ -191,6 +198,7 @@ public void add(byte[] pBuffer, int pOffset, int pLength) {
* Same as {@link #hasSpace(int) hasSpace(1)}.
* @see #hasSpace(int)
* @see #getSpace()
+ * @return true if there is space for a byte
*/
public boolean hasSpace() {
return currentNumberOfBytes < buffer.length;
@@ -200,6 +208,8 @@ public boolean hasSpace() {
* Returns, whether there is currently room for the given number of bytes in the buffer.
* @see #hasSpace()
* @see #getSpace()
+ * @param pBytes the byte count
+ * @return true if there is space for the given number of bytes
*/
public boolean hasSpace(int pBytes) {
return currentNumberOfBytes+pBytes <= buffer.length;
@@ -207,6 +217,7 @@ public boolean hasSpace(int pBytes) {
/**
* Returns, whether the buffer is currently holding, at least, a single byte.
+ * @return true if the buffer is not empty
*/
public boolean hasBytes() {
return currentNumberOfBytes > 0;
@@ -214,6 +225,7 @@ public boolean hasBytes() {
/**
* Returns the number of bytes, that can currently be added to the buffer.
+ * @return the number of bytes that can be added
*/
public int getSpace() {
return buffer.length - currentNumberOfBytes;
@@ -221,6 +233,7 @@ public int getSpace() {
/**
* Returns the number of bytes, that are currently present in the buffer.
+ * @return the number of bytes
*/
public int getCurrentNumberOfBytes() {
return currentNumberOfBytes;

MODIFY
src/main/java/org/apache/commons/io/input/buffer/PeekableInputStream.java
src/main/java/org/apache/commons/io/input/buffer/PeekableInputStream.java
@@ -39,8 +39,6 @@ public PeekableInputStream(InputStream pIn, int pBufferSize) {
/** Creates a new instance, which filters the given input stream, and
* uses a reasonable default buffer size (8192).
* @param pIn The input stream, which is being buffered.
- * @param pBufferSize The size of the {@link CircularByteBuffer}, which is
- * used internally.
*/
public PeekableInputStream(InputStream pIn) {
super(pIn);
@@ -50,8 +48,8 @@ public PeekableInputStream(InputStream pIn) {
* Returns, whether the next bytes in the buffer are as given by
* {@code pBuffer}. This is equivalent to {@link #peek(byte[],int,int)}
* with {@code pOffset} == 0, and {@code pLength} == {@code pBuffer.length}
- * @param pBuffer
- * @return
+ * @param pBuffer the buffer to compare against
+ * @return true if the next bytes are as given
* @throws IOException Refilling the buffer failed.
*/
public boolean peek(byte[] pBuffer) throws IOException {
@@ -69,9 +67,11 @@ public boolean peek(byte[] pBuffer) throws IOException {
/**
* Returns, whether the next bytes in the buffer are as given by
* {@code pBuffer}, {code pOffset}, and {@code pLength}.
- * @param pBuffer
- * @return
- * @throws IOException
+ * @param pBuffer the buffer to compare against
+ * @param pOffset the start offset
+ * @param pLength the length to compare
+ * @return true if the next bytes in the buffer are as given
+ * @throws IOException if there is a problem calling fillBuffer()
*/
public boolean peek(byte[] pBuffer, int pOffset, int pLength) throws IOException {
Objects.requireNonNull(pBuffer, "Buffer");

Javadoc warnings