I am looking for a Java implementation of a date formatter from an epoch milliseconds long. I do NOT want to use SimpleDateFormatter because it produces garbage to the GC. I am looking for a fast and garbage-free Java implementation. Has anyone seen that somewhere?
StringBuilder sb = getReusableStringBuilder();
parse(sb, System.currentTimeMillis());
EDIT: That’s for a logging library so it must include the time as well.
The solution was much simpler than I thought: bootstrap FieldPosition so it does not leak memory.