code: static private byte[] toBytes(
          Vector  octs)
      {
          ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
  
          for (int i = 0; i != octs.size(); i++)
          {
              try
              {
                  DEROctetString  o = (DEROctetString)octs.elementAt(i);
  
                  bOut.write(o.getOctets());
              }
              catch (ClassCastException e)
              {
                  throw new IllegalArgumentException(octs.elementAt(i).getClass().getName() + " found in input should only contain DEROctetString", e);
              }
              catch (IOException e)
              {
                  throw new IllegalArgumentException("exception converting octets " + e.getMessage(), e);
              }
          }
  
          return bOut.toByteArray();
      }
docs: convert a vector of octet strings into a single byte string