public class ByteArrayUtils extends Object
byte[] primitive values.
Interning byte[] instances doesn't seem to take too many resources both in terms of CPU and memory: 10k * 10k random
byte[] allocation alone takes around 7.8 seconds, allocation plus interning takes around 8.0 seconds.
| Constructor and Description |
|---|
ByteArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
weakIntern(byte[] values)
Return the internalized
byte[], or null if the given byte[] is null. |
public ByteArrayUtils()
public static byte[] weakIntern(byte[] values)
byte[], or null if the given byte[] is null. A weak reference remains
to each byte[] interned, so these are not prevented from being garbage-collected.values - The byte[] to internbyte[] cached in the JVM's weak Interner.Copyright © 2018 Apache Software Foundation. All rights reserved.