/** * Method used to find description from ATR * * @param pAtr * Card ATR * @return list of description */ @SuppressWarnings("unchecked") public static final Collection<String> getDescription(final String pAtr) { Collection<String> ret = null; if (StringUtils.isNotBlank(pAtr)) { String val = StringUtils.deleteWhitespace(pAtr); for (String key : MAP.keySet()) { if (val.matches("^" + key + "$")) { ret = (Collection<String>) MAP.get(key); break; } } } return ret; }
/** * Method used to find ATR description from ATS (Answer to select) * * @param pAts * EMV card ATS * @return card description */ @SuppressWarnings("unchecked") public static final Collection<String> getDescriptionFromAts(final String pAts) { Collection<String> ret = null; if (StringUtils.isNotBlank(pAts)) { String val = StringUtils.deleteWhitespace(pAts); for (String key : MAP.keySet()) { if (key.contains(val)) { // TODO Fix this ret = (Collection<String>) MAP.get(key); break; } } } return ret; }
/** * Method used to find description from ATR * * @param pAtr * Card ATR * @return list of description */ @SuppressWarnings("unchecked") public static final Collection<String> getDescription(final String pAtr) { Collection<String> ret = null; if (StringUtils.isNotBlank(pAtr)) { String val = StringUtils.deleteWhitespace(pAtr); for (String key : MAP.keySet()) { if (val.matches("^" + key + "$")) { ret = (Collection<String>) MAP.get(key); break; } } } return ret; }
/** * Method used to find ATR description from ATS (Answer to select) * * @param pAts * EMV card ATS * @return card description */ @SuppressWarnings("unchecked") public static final Collection<String> getDescriptionFromAts(final String pAts) { Collection<String> ret = null; if (StringUtils.isNotBlank(pAts)) { String val = StringUtils.deleteWhitespace(pAts); for (String key : MAP.keySet()) { if (key.contains(val)) { // TODO Fix this ret = (Collection<String>) MAP.get(key); break; } } } return ret; }
public void replayHeadersAndStatus(HttpServletResponse target) throws IOException { if (isError) { if (errorMsg != null) { target.sendError(status, errorMsg); } else { target.sendError(status); } } else if (redirectionLocation != null) { target.sendRedirect(redirectionLocation); } else { target.setStatus(status); } target.setStatus(getStatus()); final Iterator it = headers.keySet().iterator(); while (it.hasNext()) { final String header = (String) it.next(); final Collection values = (Collection) headers.get(header); final Iterator valIt = values.iterator(); while (valIt.hasNext()) { final Object val = valIt.next(); RequestHeaderUtil.setHeader(target, header, val); } } target.setContentType(getContentType()); target.setCharacterEncoding(getCharacterEncoding()); target.setContentLength(getContentLength()); }
final MultiMap headers = getHeaders(); final Iterator it = headers.keySet().iterator(); while (it.hasNext()) { final String header = (String) it.next();