java.lang.Object
net.i2p.util.ByteCache.ByteArrayFactory
- All Implemented Interfaces:
TryCache.ObjectFactory<ByteArray>
- Enclosing class:
ByteCache
private static class ByteCache.ByteArrayFactoryextends Object implements TryCache.ObjectFactory<ByteArray>
Factory for cached byte arrays.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionCreate a new byte array of the configured size, marked empty.
Field Details
sz
private final int szThe size of the arrays made.
Constructor Details
ByteArrayFactory
ByteArrayFactory(int entrySize) Makes arrays of one size.- Parameters:
entrySize- the size of the arrays
Method Details
newInstance
Create a new byte array of the configured size, marked empty.- Specified by:
newInstancein interfaceTryCache.ObjectFactory<ByteArray>- Returns:
- a newly created instance of the cached type