org.apache.mina.util.byteaccess

## Class SimpleByteArrayFactory

- java.lang.Object
- - 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 `ByteArray`s is a nop.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleByteArrayFactory()` Creates a new instance of SimpleByteArrayFactory.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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-2012 Apache MINA Project. All Rights Reserved.