code: public static ASN1OctetString getInstance(
          Object  obj)
      {
          if (obj == null || obj instanceof ASN1OctetString)
          {
              return (ASN1OctetString)obj;
          }
  
          if (obj instanceof ASN1TaggedObject)
          {
              return getInstance(((ASN1TaggedObject)obj).getObject());
          }
  
          if (obj instanceof ASN1Sequence)
          {
              Vector      v = new Vector();
              Enumeration e = ((ASN1Sequence)obj).getObjects();
  
              while (e.hasMoreElements())
              {
                  v.addElement(e.nextElement());
              }
  
              return new BERConstructedOctetString(v);
          }
  
          throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
      }
docs: return an Octet String from the given object.
  
  @param obj the object we want converted.
  @exception IllegalArgumentException if the object cannot be converted.