java.lang.Object
net.i2p.util.SimpleByteCache.ByteArrayFactory
- All Implemented Interfaces:
TryCache.ObjectFactory<byte[]>
- Enclosing class:
SimpleByteCache
private static class SimpleByteCache.ByteArrayFactoryextends Object implements TryCache.ObjectFactory<byte[]>
Factory for cached byte arrays.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All Methods
Field Details
sz
private final int szSize of the arrays this factory makes.
Constructor Details
ByteArrayFactory
ByteArrayFactory(int entrySize) Builds the array factory.- Parameters:
entrySize- the size of the arrays to make
Method Details
newInstance
public byte[] newInstance()Description copied from interface:TryCache.ObjectFactoryCreate instance.- Specified by:
newInstancein interfaceTryCache.ObjectFactory<byte[]>- Returns:
- a newly created instance of the cached type