< prev index next >

src/java.base/share/classes/java/io/ByteArrayInputStream.java

Print this page

        

@@ -51,11 +51,11 @@
      * through {@code buf[count-1]} are the
      * only bytes that can ever be read from the
      * stream;  element {@code buf[pos]} is
      * the next byte to be read.
      */
-    protected byte buf[];
+    protected byte[] buf;
 
     /**
      * The index of the next character to read from the input stream buffer.
      * This value should always be nonnegative
      * and not larger than the value of {@code count}.

@@ -100,11 +100,11 @@
      * of  {@code count} is the length of
      * {@code buf}.
      *
      * @param   buf   the input buffer.
      */
-    public ByteArrayInputStream(byte buf[]) {
+    public ByteArrayInputStream(byte[] buf) {
         this.buf = buf;
         this.pos = 0;
         this.count = buf.length;
     }
 

@@ -120,11 +120,11 @@
      *
      * @param   buf      the input buffer.
      * @param   offset   the offset in the buffer of the first byte to read.
      * @param   length   the maximum number of bytes to read from the buffer.
      */
-    public ByteArrayInputStream(byte buf[], int offset, int length) {
+    public ByteArrayInputStream(byte[] buf, int offset, int length) {
         this.buf = buf;
         this.pos = offset;
         this.count = Math.min(offset + length, buf.length);
         this.mark = offset;
     }

@@ -167,11 +167,11 @@
      * @throws  NullPointerException If {@code b} is {@code null}.
      * @throws  IndexOutOfBoundsException If {@code off} is negative,
      * {@code len} is negative, or {@code len} is greater than
      * {@code b.length - off}
      */
-    public synchronized int read(byte b[], int off, int len) {
+    public synchronized int read(byte[] b, int off, int len) {
         Objects.checkFromIndexSize(off, len, b.length);
 
         if (pos >= count) {
             return -1;
         }
< prev index next >