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 ByteArrays is a nop.
  • Constructor Details

    • SimpleByteArrayFactory

      public SimpleByteArrayFactory()
      Creates a new instance of SimpleByteArrayFactory.
  • Method Details

    • create

      public ByteArray create(int size)
      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