Code example for ConcurrentHashMap

Methods: values

0
 
    return clearedAny;
} 
 
public List<Cookie> getCookies() {
    return new ArrayList<Cookie>(cookies.values());
} 
 
 
// 
// Cookie serialization/deserialization 
// 
 
protected String encodeCookie(SerializableCookie cookie) {
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    try { 
        ObjectOutputStream outputStream = new ObjectOutputStream(os);
        outputStream.writeObject(cookie);
    } catch (Exception e) {
        return null; 
    }