public abstract class AbstractChannelBufferFactory extends Object implements ChannelBufferFactory
ChannelBufferFactory
.Modifier | Constructor and Description |
---|---|
protected |
AbstractChannelBufferFactory()
Creates a new factory whose default
ByteOrder is
ByteOrder.BIG_ENDIAN . |
protected |
AbstractChannelBufferFactory(ByteOrder defaultOrder)
Creates a new factory with the specified default
ByteOrder . |
Modifier and Type | Method and Description |
---|---|
ChannelBuffer |
getBuffer(int capacity)
Returns a
ChannelBuffer with the specified capacity . |
ByteOrder |
getDefaultOrder()
Returns the default endianness of the
ChannelBuffer which is
returned by ChannelBufferFactory.getBuffer(int) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBuffer
protected AbstractChannelBufferFactory()
ByteOrder
is
ByteOrder.BIG_ENDIAN
.public ChannelBuffer getBuffer(int capacity)
ChannelBufferFactory
ChannelBuffer
with the specified capacity
.
This method is identical to getBuffer(getDefaultOrder(), capacity)
.getBuffer
in interface ChannelBufferFactory
capacity
- the capacity of the returned ChannelBuffer
ChannelBuffer
with the specified capacity
,
whose readerIndex
and writerIndex
are 0
public ByteOrder getDefaultOrder()
ChannelBufferFactory
ChannelBuffer
which is
returned by ChannelBufferFactory.getBuffer(int)
.getDefaultOrder
in interface ChannelBufferFactory
ChannelBuffer
which is
returned by ChannelBufferFactory.getBuffer(int)
Copyright © 2008-2012 JBoss, by Red Hat. All Rights Reserved.