All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.util.PerfUtil

java.lang.Object
   |
   +----sun.server.util.PerfUtil

public class PerfUtil
extends Object

Constructor Index

 o PerfUtil()

Method Index

 o hash(String)
Work around a bug in String.hashCode() for strings > 16 in length.
 o intGetBytes(int, byte[], int)
Place a byte representation of src into the byte array buf.

Constructors

 o PerfUtil
 public PerfUtil()

Methods

 o intGetBytes
 public static int intGetBytes(int src,
                               byte buf[],
                               int offset)
Place a byte representation of src into the byte array buf. No commas or any other formatting is done to the integer.

Parameters:
src - - the integer to convert. Must not be Integer.MIN_VALUE.
buf - - the buf to put the result in
offset - - the offset in buf to place the first digit
Returns:
the number of bytes added to buf
Throws: IllegalArgumentException
if src is Integer.MIN_VALUE.
 o hash
 public static int hash(String s)
Work around a bug in String.hashCode() for strings > 16 in length. This hashes on the last 16 characters for a string longer than 16 chars in length. This probably needs more work...


All Packages  Class Hierarchy  This Package  Previous  Next  Index