net.sf.mmm.util.pool.base.NoByteArrayPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mmm-util-io Show documentation
Show all versions of mmm-util-io Show documentation
Utilities for input/output and streaming.
The newest version!
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.util.pool.base;
import net.sf.mmm.util.pool.api.ByteArrayPool;
/**
* This is a {@link AbstractNoPool dummy pool} for byte-arrays.
*
* @author Joerg Hohwiller (hohwille at users.sourceforge.net)
* @since 1.0.0
*/
public final class NoByteArrayPool extends AbstractNoPool implements ByteArrayPool {
/** The singleton instance. */
public static final NoByteArrayPool INSTANCE = new NoByteArrayPool();
/** The default length of the managed byte-arrays. */
private static final int ARRAY_LENGTH = 4096;
/**
* The constructor.
*/
private NoByteArrayPool() {
super();
}
@Override
public byte[] borrow() {
return new byte[ARRAY_LENGTH];
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy