/** * Confirm that the byte at the current position matches the given value. * * @param val the expected next byte. * @throws WSSecurityException * if the current position is at the end of the array, or if the * byte at the current position doesn't match the expected value. */ public void expect(byte val) throws WSSecurityException { if (!test(val)) { log.debug("DER mismatch: expected " + val + ", got " + arr[pos]); throw new WSSecurityException( WSSecurityException.UNSUPPORTED_SECURITY_TOKEN, "noSKIHandling", new Object[] { "Invalid DER format" } ); } pos++; }
/** * Confirm that the byte at the current position matches the given value. * * @param val the expected next byte. * @throws WSSecurityException * if the current position is at the end of the array, or if the * byte at the current position doesn't match the expected value. */ public void expect(byte val) throws WSSecurityException { if (!test(val)) { log.debug("DER mismatch: expected " + val + ", got " + arr[pos]); throw new WSSecurityException( WSSecurityException.UNSUPPORTED_SECURITY_TOKEN, "noSKIHandling", new Object[] { "Invalid DER format" } ); } pos++; }