org.apache.mina.util.byteaccess
Class SimpleByteArrayFactory

java.lang.Object
  extended by org.apache.mina.util.byteaccess.SimpleByteArrayFactory
All Implemented Interfaces:
ByteArrayFactory

public class SimpleByteArrayFactory
extends Object
implements ByteArrayFactory

Creates ByteArray backed by a heap-allocated IoBuffer. The free method on returned ByteArrays is a nop.

Version:
$Rev$, $Date$
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
SimpleByteArrayFactory()
          Creates a new instance of SimpleByteArrayFactory.
 
Method Summary
 ByteArray create(int size)
          Creates an instance of ByteArray of size specified by the size parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleByteArrayFactory

public SimpleByteArrayFactory()
Creates a new instance of SimpleByteArrayFactory.

Method Detail

create

public ByteArray create(int size)
Description copied from interface: ByteArrayFactory
Creates an instance of ByteArray of size specified by the size parameter.

Specified by:
create in interface ByteArrayFactory
Parameters:
size - The size of the ByteArray
Returns:
The ByteArray


Copyright © 2004-2010 Apache MINA Project. All Rights Reserved.