commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject commons-io git commit: Javadoc warnings
Date Mon, 15 Oct 2018 21:35:58 GMT
Repository: commons-io
Updated Branches:
  refs/heads/master cc1a99482 -> 1f925d7ad


Javadoc warnings

Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/1f925d7a
Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/1f925d7a
Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/1f925d7a

Branch: refs/heads/master
Commit: 1f925d7ad6d9da7ec75ba29e8668dd3267f104c1
Parents: cc1a994
Author: Sebb <sebb@apache.org>
Authored: Mon Oct 15 22:35:54 2018 +0100
Committer: Sebb <sebb@apache.org>
Committed: Mon Oct 15 22:35:54 2018 +0100

----------------------------------------------------------------------
 .../commons/io/input/ObservableInputStream.java    |  1 +
 .../io/input/buffer/CircularBufferInputStream.java |  2 --
 .../io/input/buffer/CircularByteBuffer.java        | 17 +++++++++++++++--
 .../io/input/buffer/PeekableInputStream.java       | 14 +++++++-------
 4 files changed, 23 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-io/blob/1f925d7a/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/io/input/ObservableInputStream.java b/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
index 9c12c4b..a53e90d 100644
--- a/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
@@ -72,6 +72,7 @@ public class ObservableInputStream extends ProxyInputStream {
 
         /**
          * 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;
}

http://git-wip-us.apache.org/repos/asf/commons-io/blob/1f925d7a/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java
b/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java
index 7298e5b..20be218 100644
--- a/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java
@@ -53,8 +53,6 @@ public class CircularBufferInputStream extends InputStream {
 	/** 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);

http://git-wip-us.apache.org/repos/asf/commons-io/blob/1f925d7a/src/main/java/org/apache/commons/io/input/buffer/CircularByteBuffer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/io/input/buffer/CircularByteBuffer.java b/src/main/java/org/apache/commons/io/input/buffer/CircularByteBuffer.java
index 52d84bb..8fb82d3 100644
--- a/src/main/java/org/apache/commons/io/input/buffer/CircularByteBuffer.java
+++ b/src/main/java/org/apache/commons/io/input/buffer/CircularByteBuffer.java
@@ -31,6 +31,7 @@ public class CircularByteBuffer {
 
 	/**
 	 * 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 class CircularByteBuffer {
 	 * {@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 class CircularByteBuffer {
 	/**
 	 * 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 class CircularByteBuffer {
 	 * 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 class CircularByteBuffer {
 	 * 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 class CircularByteBuffer {
 
 	/**
 	 * 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 class CircularByteBuffer {
 
 	/**
 	 * 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 class CircularByteBuffer {
 
 	/**
 	 * Returns the number of bytes, that are currently present in the buffer.
+	 * @return the number of bytes
 	 */
 	public int getCurrentNumberOfBytes() {
 		return currentNumberOfBytes;

http://git-wip-us.apache.org/repos/asf/commons-io/blob/1f925d7a/src/main/java/org/apache/commons/io/input/buffer/PeekableInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/io/input/buffer/PeekableInputStream.java b/src/main/java/org/apache/commons/io/input/buffer/PeekableInputStream.java
index e56c378..6263846 100644
--- a/src/main/java/org/apache/commons/io/input/buffer/PeekableInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/buffer/PeekableInputStream.java
@@ -39,8 +39,6 @@ public class PeekableInputStream extends CircularBufferInputStream {
 	/** 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 class PeekableInputStream extends CircularBufferInputStream {
 	 * 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 class PeekableInputStream extends CircularBufferInputStream {
 	/**
 	 * 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");


Mime
View raw message