01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: HexFormatter.java,v 1.11.2.2 2008/01/07 15:14:18 cwl Exp $
07: */
08:
09: package com.sleepycat.je.utilint;
10:
11: public class HexFormatter {
12: static public String formatLong(long l) {
13: StringBuffer sb = new StringBuffer();
14: sb.append(Long.toHexString(l));
15: sb.insert(0, "0000000000000000".substring(0, 16 - sb.length()));
16: sb.insert(0, "0x");
17: return sb.toString();
18: }
19: }
|