Java Timestamp Create createEtag(String cookieId, Date timestamp)

Here you can find the source of createEtag(String cookieId, Date timestamp)

Description

create Etag

License

Open Source License

Declaration

public static String createEtag(String cookieId, Date timestamp) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    private static final SimpleDateFormat fmt = new SimpleDateFormat(
            "yyyy-MM-dd-HH:mm:ss.SSS");

    public static String createEtag(String cookieId, Date timestamp) {
        StringBuilder sb = new StringBuilder("\"");
        sb.append(cookieId);/*from ww w.  j a  va2  s.  c om*/
        sb.append("/");
        sb.append(fmt.format(timestamp));
        sb.append("\"");
        return sb.toString();
    }
}

Related

  1. createTimeStamp()
  2. createTimestamp()
  3. createTimeStamp()
  4. createTimeStamp()