private boolean CFASLStringTest(String str, int opcode) {
    try {
      ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
      CfaslOutputStream cos = new CfaslOutputStream(baos);
      cos.writeObject(str);
      cos.flush();
      byte[] ba = baos.toByteArray();
      if (ba == null || ba.length == 0) {
        fail("Null Byte Array Return");
      }
      //System.out.println("BA test: "+ba.length);
      //for(int i=0;i<ba.length;i++)
      //  System.out.println("ba check "+i+" "+Integer.toHexString(0xff & (int)ba[i]));
      assertEquals((int) ba[0], opcode);  // make sure opcode is correct
      ByteArrayInputStream bais = new ByteArrayInputStream(ba);

      CfaslInputStream cis = new CfaslInputStream(bais);
      Object obj = cis.readObject();
      assertTrue(obj instanceof String);
      String result = (String) obj;
      assertTrue(result.equals(str));
    } catch (IOException e) {
      fail("IOException CFASLStringTest for: " + str);
    }
    return true;

  }