resolve darcs stupidity
[org.ibex.core.git] / src / org / bouncycastle / asn1 / BERInputStream.java
index fd960ec..bf113b4 100644 (file)
@@ -1,21 +1,20 @@
 package org.bouncycastle.asn1;
 
-import java.math.BigInteger;
 import java.io.*;
 import java.util.*;
 
 public class BERInputStream
     extends DERInputStream
 {
-       private DERObject END_OF_STREAM = new DERObject() {
-                                                                               void encode(
-                                                                                       DEROutputStream out)
-                                                                               throws IOException
-                                                                               {
-                                                                                       throw new IOException("Eeek!");
-                                                                               }
-
-                                                                       };
+        private DERObject END_OF_STREAM = new DERObject() {
+                                                                                void encode(
+                                                                                        DEROutputStream out)
+                                                                                throws IOException
+                                                                                {
+                                                                                        throw new IOException("Eeek!");
+                                                                                }
+
+                                                                        };
     public BERInputStream(
         InputStream is)
     {
@@ -35,10 +34,10 @@ public class BERInputStream
 
         while ((b = read()) >= 0)
         {
-                       if (b1 == 0 && b == 0)
-                       {
-                               break;
-                       }
+                        if (b1 == 0 && b == 0)
+                        {
+                                break;
+                        }
 
             bOut.write(b1);
             b1 = b;
@@ -47,25 +46,25 @@ public class BERInputStream
         return bOut.toByteArray();
     }
 
-       private BERConstructedOctetString buildConstructedOctetString()
-               throws IOException
-       {
+        private BERConstructedOctetString buildConstructedOctetString()
+                throws IOException
+        {
         Vector                  octs = new Vector();
 
-               for (;;)
-               {
-                       DERObject               o = readObject();
+                for (;;)
+                {
+                        DERObject               o = readObject();
 
-                       if (o == END_OF_STREAM)
-                       {
-                               break;
-                       }
+                        if (o == END_OF_STREAM)
+                        {
+                                break;
+                        }
 
             octs.addElement(o);
-               }
+                }
 
-               return new BERConstructedOctetString(octs);
-       }
+                return new BERConstructedOctetString(octs);
+        }
 
     public DERObject readObject()
         throws IOException
@@ -87,35 +86,35 @@ public class BERInputStream
             case SEQUENCE | CONSTRUCTED:
                 BERConstructedSequence  seq = new BERConstructedSequence();
     
-                               for (;;)
-                               {
-                                       DERObject   obj = readObject();
-
-                                       if (obj == END_OF_STREAM)
-                                       {
-                                               break;
-                                       }
-
-                                       seq.addObject(obj);
-                               }
-                               return seq;
+                                for (;;)
+                                {
+                                        DERObject   obj = readObject();
+
+                                        if (obj == END_OF_STREAM)
+                                        {
+                                                break;
+                                        }
+
+                                        seq.addObject(obj);
+                                }
+                                return seq;
             case OCTET_STRING | CONSTRUCTED:
-                               return buildConstructedOctetString();
+                                return buildConstructedOctetString();
             case SET | CONSTRUCTED:
                 DEREncodableVector  v = new DEREncodableVector();
     
-                               for (;;)
-                               {
-                                       DERObject   obj = readObject();
-
-                                       if (obj == END_OF_STREAM)
-                                       {
-                                               break;
-                                       }
-
-                                       v.add(obj);
-                               }
-                               return new BERSet(v);
+                                for (;;)
+                                {
+                                        DERObject   obj = readObject();
+
+                                        if (obj == END_OF_STREAM)
+                                        {
+                                                break;
+                                        }
+
+                                        v.add(obj);
+                                }
+                                return new BERSet(v);
             default:
                 //
                 // with tagged object tag number is bottom 5 bits
@@ -140,9 +139,9 @@ public class BERInputStream
                     //
                     // either constructed or explicitly tagged
                     //
-                                       DERObject               dObj = readObject();
+                                        DERObject               dObj = readObject();
 
-                                       if (dObj == END_OF_STREAM)     // empty tag!
+                                        if (dObj == END_OF_STREAM)     // empty tag!
                     {
                         return new DERTaggedObject(tag & 0x1f);
                     }
@@ -189,7 +188,7 @@ public class BERInputStream
     
             readFully(bytes);
     
-                       return buildObject(tag, bytes);
+                        return buildObject(tag, bytes);
         }
     }
 }