You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/04/12 16:06:53 UTC

[commons-io] branch master updated: No weird C-like names.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new c8ed530  No weird C-like names.
c8ed530 is described below

commit c8ed530b739b3098740c946d9d75dfc21e2186cd
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Apr 12 12:06:49 2020 -0400

    No weird C-like names.
---
 .../io/input/buffer/CircularBufferInputStream.java | 30 +++++++++++-----------
 1 file changed, 15 insertions(+), 15 deletions(-)

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 1ab8000..557cef0 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
@@ -36,19 +36,19 @@ public class CircularBufferInputStream extends InputStream {
      * Creates a new instance, which filters the given input stream, and
      * uses the given buffer size.
      *
-     * @param pIn         The input stream, which is being buffered.
-     * @param pBufferSize The size of the {@link CircularByteBuffer}, which is
+     * @param inputStream         The input stream, which is being buffered.
+     * @param bufferSize The size of the {@link CircularByteBuffer}, which is
      *                    used internally.
      */
-    public CircularBufferInputStream(final InputStream pIn, final int pBufferSize) {
-        Objects.requireNonNull(pIn, "InputStream");
-        if (pBufferSize <= 0) {
-            throw new IllegalArgumentException("Invalid buffer size: " + pBufferSize);
+    public CircularBufferInputStream(final InputStream inputStream, final int bufferSize) {
+        Objects.requireNonNull(inputStream, "InputStream");
+        if (bufferSize <= 0) {
+            throw new IllegalArgumentException("Invalid buffer size: " + bufferSize);
         }
-        in = pIn;
-        buffer = new CircularByteBuffer(pBufferSize);
-        bufferSize = pBufferSize;
-        eofSeen = false;
+        this.in = inputStream;
+        this.buffer = new CircularByteBuffer(bufferSize);
+        this.bufferSize = bufferSize;
+        this.eofSeen = false;
     }
 
     /**
@@ -87,12 +87,12 @@ public class CircularBufferInputStream extends InputStream {
     /**
      * Fills the buffer from the input stream until the given number of bytes have been added to the buffer.
      *
-     * @param pNumber number of byte to fill into the buffer
+     * @param number number of byte to fill into the buffer
      * @return true if the buffer has bytes
      * @throws IOException in case of an error while reading from the input stream.
      */
-    protected boolean haveBytes(final int pNumber) throws IOException {
-        if (buffer.getCurrentNumberOfBytes() < pNumber) {
+    protected boolean haveBytes(final int number) throws IOException {
+        if (buffer.getCurrentNumberOfBytes() < number) {
             fillBuffer();
         }
         return buffer.hasBytes();
@@ -107,8 +107,8 @@ public class CircularBufferInputStream extends InputStream {
     }
 
     @Override
-    public int read(final byte[] pBuffer) throws IOException {
-        return read(pBuffer, 0, pBuffer.length);
+    public int read(final byte[] buffer) throws IOException {
+        return read(buffer, 0, buffer.length);
     }
 
     @Override