jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ByteSequence.java
changeset 46174 5611d2529b49
parent 44797 8b3b3b911b8a
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ByteSequence.java	Tue Aug 08 22:52:41 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ByteSequence.java	Sun Aug 13 21:10:40 2017 -0700
@@ -21,29 +21,51 @@
 
 package com.sun.org.apache.bcel.internal.util;
 
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
 
 /**
  * Utility class that implements a sequence of bytes which can be read
  * via the `readByte()' method. This is used to implement a wrapper for the
  * Java byte code stream to gain some more readability.
  *
- * @author  <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
+ * @version $Id: ByteSequence.java 1747278 2016-06-07 17:28:43Z britter $
  */
 public final class ByteSequence extends DataInputStream {
-  private ByteArrayStream byte_stream;
+
+    private final ByteArrayStream byteStream;
+
+
+    public ByteSequence(final byte[] bytes) {
+        super(new ByteArrayStream(bytes));
+        byteStream = (ByteArrayStream) in;
+    }
 
-  public ByteSequence(byte[] bytes) {
-    super(new ByteArrayStream(bytes));
-    byte_stream = (ByteArrayStream)in;
-  }
+
+    public final int getIndex() {
+        return byteStream.getPosition();
+    }
+
+
+    final void unreadByte() {
+        byteStream.unreadByte();
+    }
 
-  public final int getIndex()   { return byte_stream.getPosition(); }
-  final  void      unreadByte() { byte_stream.unreadByte(); }
+    private static final class ByteArrayStream extends ByteArrayInputStream {
+
+        ByteArrayStream(final byte[] bytes) {
+            super(bytes);
+        }
 
-  private static final class ByteArrayStream extends ByteArrayInputStream {
-    ByteArrayStream(byte[] bytes) { super(bytes); }
-    final int  getPosition() { return pos; } // is protected in ByteArrayInputStream
-    final void unreadByte()  { if(pos > 0) pos--; }
-  }
+        final int getPosition() {
+            // pos is protected in ByteArrayInputStream
+            return pos;
+        }
+
+        final void unreadByte() {
+            if (pos > 0) {
+                pos--;
+            }
+        }
+    }
 }