Package io.netty.buffer

Examples of io.netty.buffer.ByteBuf.release()


                {
                    codec.encode(message, body, version);
                }
                catch (Throwable e)
                {
                    body.release();
                    throw e;
                }

                results.add(Frame.create(message.type, message.getStreamId(), version, flags, body));
            }
View Full Code Here


                int written = Snappy.compress(input, 0, input.length, output.array(), output.arrayOffset());
                output.writerIndex(written);
            }
            catch (final Throwable e)
            {
                output.release();
                throw e;
            }
            finally
            {
                //release the old frame
View Full Code Here

                int size = Snappy.uncompress(input, 0, input.length, output.array(), output.arrayOffset());
                output.writerIndex(size);
            }
            catch (final Throwable e)
            {
                output.release();
                throw e;
            }
            finally
            {
                //release the old frame
View Full Code Here

                return frame.with(outputBuf);
            }
            catch (final Throwable e)
            {
                outputBuf.release();
                throw e;
            }
            finally
            {
                //release the old frame
View Full Code Here

                return frame.with(output);
            }
            catch (final Throwable e)
            {
                output.release();
                throw e;
            }
            finally
            {
                //release the old frame
View Full Code Here

                                                          public ByteBuf call(ByteBuf byteBuf) {
                                                              return byteBuf.retain();
                                                          }
                                                      }).toBlocking().toFuture().get(1, TimeUnit.MINUTES);
        Assert.assertEquals("Unexpected Content.", WELCOME_SERVER_MSG, response.toString(Charset.defaultCharset()));
        response.release();
    }
}
View Full Code Here

                          type = RemoteRxEvent.Type.unsubscribed;
                        }else{
                          throw new RuntimeException("operation: "+operation+" not support.");
                        }
                        handled = true;
                        byteBuf.release();
                        ctx.fireChannelRead(new RemoteRxEvent(observableName, type, valueData, subscribeParams));                       
                    }
        }
        if (!handled){
          super.channelRead(ctx, msg);
View Full Code Here

                int written = Snappy.compress(input, 0, input.length, output.array(), output.arrayOffset());
                output.writerIndex(written);
            }
            catch (final Throwable e)
            {
                output.release();
                throw e;
            }
            finally
            {
                //release the old frame
View Full Code Here

                int size = Snappy.uncompress(input, 0, input.length, output.array(), output.arrayOffset());
                output.writerIndex(size);
            }
            catch (final Throwable e)
            {
                output.release();
                throw e;
            }
            finally
            {
                //release the old frame
View Full Code Here

                return frame.with(outputBuf);
            }
            catch (final Throwable e)
            {
                outputBuf.release();
                throw e;
            }
            finally
            {
                //release the old frame
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.