Author: dbrosius Date: Sun Oct 18 01:15:08 2009 New Revision: 826328 URL: http://svn.apache.org/viewvc?rev=826328&view=rev Log: base parse input on DataInput interface rather than DataInputStream class
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/CodeException.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantCP.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantClass.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantDouble.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantFloat.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantInteger.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantLong.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantString.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantValue.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/InnerClass.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LineNumber.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariable.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/PMGClass.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/SourceFile.java jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapType.java Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/CodeException.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/CodeException.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/CodeException.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/CodeException.java Sun Oct 18 01:15:08 2009 @@ -16,10 +16,11 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; import java.io.Serializable; + import org.apache.bcel.Constants; /** @@ -57,7 +58,7 @@ * @param file Input stream * @throws IOException */ - CodeException(DataInputStream file) throws IOException { + CodeException(DataInput file) throws IOException { this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file .readUnsignedShort()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantCP.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantCP.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantCP.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantCP.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -52,7 +53,7 @@ * @param file Input stream * @throws IOException */ - ConstantCP(byte tag, DataInputStream file) throws IOException { + ConstantCP(byte tag, DataInput file) throws IOException { this(tag, file.readUnsignedShort(), file.readUnsignedShort()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantClass.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantClass.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantClass.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantClass.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -49,7 +50,7 @@ * @param file Input stream * @throws IOException */ - ConstantClass(DataInputStream file) throws IOException { + ConstantClass(DataInput file) throws IOException { this(file.readUnsignedShort()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantDouble.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantDouble.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantDouble.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantDouble.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -58,7 +59,7 @@ * @param file Input stream * @throws IOException */ - ConstantDouble(DataInputStream file) throws IOException { + ConstantDouble(DataInput file) throws IOException { this(file.readDouble()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantFloat.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantFloat.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantFloat.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantFloat.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -59,7 +60,7 @@ * @param file Input stream * @throws IOException */ - ConstantFloat(DataInputStream file) throws IOException { + ConstantFloat(DataInput file) throws IOException { this(file.readFloat()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantInteger.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantInteger.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantInteger.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantInteger.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -58,7 +59,7 @@ * @param file Input stream * @throws IOException */ - ConstantInteger(DataInputStream file) throws IOException { + ConstantInteger(DataInput file) throws IOException { this(file.readInt()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantLong.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantLong.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantLong.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantLong.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -58,7 +59,7 @@ * @param file Input stream * @throws IOException */ - ConstantLong(DataInputStream file) throws IOException { + ConstantLong(DataInput file) throws IOException { this(file.readLong()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -51,7 +52,7 @@ * @param file Input stream * @throws IOException */ - ConstantNameAndType(DataInputStream file) throws IOException { + ConstantNameAndType(DataInput file) throws IOException { this(file.readUnsignedShort(), file.readUnsignedShort()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantString.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantString.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantString.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantString.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -49,7 +50,7 @@ * @param file Input stream * @throws IOException */ - ConstantString(DataInputStream file) throws IOException { + ConstantString(DataInput file) throws IOException { this(file.readUnsignedShort()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -49,7 +50,7 @@ * @param file Input stream * @throws IOException */ - ConstantUtf8(DataInputStream file) throws IOException { + ConstantUtf8(DataInput file) throws IOException { super(Constants.CONSTANT_Utf8); bytes = file.readUTF(); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantValue.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantValue.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantValue.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantValue.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -52,7 +53,7 @@ * @param constant_pool Array of constants * @throws IOException */ - ConstantValue(int name_index, int length, DataInputStream file, ConstantPool constant_pool) + ConstantValue(int name_index, int length, DataInput file, ConstantPool constant_pool) throws IOException { this(name_index, length, file.readUnsignedShort(), constant_pool); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java Sun Oct 18 01:15:08 2009 @@ -12,7 +12,7 @@ * ******************************************************************/ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; @@ -39,7 +39,7 @@ private int methodIndex; // Ctors - and code to read an attribute in. - public EnclosingMethod(int nameIndex, int len, DataInputStream dis, ConstantPool cpool) throws IOException { + public EnclosingMethod(int nameIndex, int len, DataInput dis, ConstantPool cpool) throws IOException { this(nameIndex, len, dis.readUnsignedShort(), dis.readUnsignedShort(), cpool); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/InnerClass.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/InnerClass.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/InnerClass.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/InnerClass.java Sun Oct 18 01:15:08 2009 @@ -16,10 +16,11 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; import java.io.Serializable; + import org.apache.bcel.Constants; /** @@ -53,7 +54,7 @@ * @param file Input stream * @throws IOException */ - InnerClass(DataInputStream file) throws IOException { + InnerClass(DataInput file) throws IOException { this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file .readUnsignedShort()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LineNumber.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LineNumber.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LineNumber.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LineNumber.java Sun Oct 18 01:15:08 2009 @@ -16,7 +16,7 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; import java.io.Serializable; @@ -49,7 +49,7 @@ * @param file Input stream * @throws IOException */ - LineNumber(DataInputStream file) throws IOException { + LineNumber(DataInput file) throws IOException { this(file.readUnsignedShort(), file.readUnsignedShort()); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariable.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariable.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariable.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariable.java Sun Oct 18 01:15:08 2009 @@ -16,10 +16,11 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; import java.io.Serializable; + import org.apache.bcel.Constants; /** @@ -57,7 +58,7 @@ * @param file Input stream * @throws IOException */ - LocalVariable(DataInputStream file, ConstantPool constant_pool) throws IOException { + LocalVariable(DataInput file, ConstantPool constant_pool) throws IOException { this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file .readUnsignedShort(), file.readUnsignedShort(), constant_pool); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/PMGClass.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/PMGClass.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/PMGClass.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/PMGClass.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -52,7 +53,7 @@ * @param constant_pool Array of constants * @throws IOException */ - PMGClass(int name_index, int length, DataInputStream file, ConstantPool constant_pool) + PMGClass(int name_index, int length, DataInput file, ConstantPool constant_pool) throws IOException { this(name_index, length, file.readUnsignedShort(), file.readUnsignedShort(), constant_pool); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Signature.java Sun Oct 18 01:15:08 2009 @@ -17,9 +17,10 @@ package org.apache.bcel.classfile; import java.io.ByteArrayInputStream; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -52,7 +53,7 @@ * @param constant_pool Array of constants * @throws IOException */ - Signature(int name_index, int length, DataInputStream file, ConstantPool constant_pool) + Signature(int name_index, int length, DataInput file, ConstantPool constant_pool) throws IOException { this(name_index, length, file.readUnsignedShort(), constant_pool); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/SourceFile.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/SourceFile.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/SourceFile.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/SourceFile.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -53,7 +54,7 @@ * @param constant_pool Array of constants * @throws IOException */ - SourceFile(int name_index, int length, DataInputStream file, ConstantPool constant_pool) + SourceFile(int name_index, int length, DataInput file, ConstantPool constant_pool) throws IOException { this(name_index, length, file.readUnsignedShort(), constant_pool); } Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapType.java URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapType.java?rev=826328&r1=826327&r2=826328&view=diff ============================================================================== --- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapType.java (original) +++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapType.java Sun Oct 18 01:15:08 2009 @@ -16,9 +16,10 @@ */ package org.apache.bcel.classfile; -import java.io.DataInputStream; +import java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; + import org.apache.bcel.Constants; /** @@ -43,7 +44,7 @@ * @param file Input stream * @throws IOException */ - StackMapType(DataInputStream file, ConstantPool constant_pool) throws IOException { + StackMapType(DataInput file, ConstantPool constant_pool) throws IOException { this(file.readByte(), -1, constant_pool); if (hasIndex()) { setIndex(file.readShort()); --------------------------------------------------------------------- To unsubscribe, e-mail: bcel-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: bcel-dev-h...@jakarta.apache.org