Search in sources :

Example 21 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestByteBufCopy method arrayPutJArray.

Object arrayPutJArray() {
    ByteBuf buf = _array();
    buf.writeBytes(jArrayData());
    return buf;
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf)

Example 22 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestByteBufCopy method directPutJArray.

Object directPutJArray() {
    ByteBuf buf = _direct();
    buf.writeBytes(jArrayData());
    return buf;
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf)

Example 23 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestByteBufCopy method arrayPutJDirect.

Object arrayPutJDirect() {
    ByteBuf buf = _array();
    buf.writeBytes(jDirectData());
    return buf;
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf)

Example 24 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestByteBufCopy method arrayGetArray.

Object arrayGetArray() {
    ByteBuf buf = _array();
    arrayData().readBytes(buf);
    return buf;
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf)

Example 25 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestDuplicatedHeapByteBuf method testDirect.

@Test
public void testDirect() {
    ByteBuf buf = ByteBuf.direct(16);
    buf.writeBytes(data.getBytes());
    ByteBuf buf2 = buf.duplicate();
    v(buf2);
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf) Test(org.junit.Test)

Aggregations

ByteBuf (com.firenio.buffer.ByteBuf)58 Test (org.junit.Test)18 ByteBufAllocator (com.firenio.buffer.ByteBufAllocator)5 Channel (com.firenio.component.Channel)5 PooledByteBufAllocator (com.firenio.buffer.PooledByteBufAllocator)4 Frame (com.firenio.component.Frame)3 IoEventHandle (com.firenio.component.IoEventHandle)3 NioEventLoopGroup (com.firenio.component.NioEventLoopGroup)3 LengthValueCodec (com.firenio.codec.lengthvalue.LengthValueCodec)2 ChannelAcceptor (com.firenio.component.ChannelAcceptor)2 ChannelConnector (com.firenio.component.ChannelConnector)2 LoggerChannelOpenListener (com.firenio.component.LoggerChannelOpenListener)2 List (java.util.List)2 CountDownLatch (java.util.concurrent.CountDownLatch)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 SSLEngine (javax.net.ssl.SSLEngine)2 SSLEngineResult (javax.net.ssl.SSLEngineResult)2 HandshakeStatus (javax.net.ssl.SSLEngineResult.HandshakeStatus)2 ByteBufAllocatorGroup (com.firenio.buffer.ByteBufAllocatorGroup)1 PoolState (com.firenio.buffer.PooledByteBufAllocator.PoolState)1