Examples of readable()


Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBuffer.readable()

            // Decode the chunk if necessary.
            if (decoder != null) {
                if (!c.isLast()) {
                    content = decode(content);
                    if (content.readable()) {
                        c.setContent(content);
                        ctx.sendUpstream(e);
                    }
                } else {
                    ChannelBuffer lastProduct = finishDecode();
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBuffer.readable()

                } else {
                    ChannelBuffer lastProduct = finishDecode();

                    // Generate an additional chunk if the decoder produced
                    // the last product on closure,
                    if (lastProduct.readable()) {
                        Channels.fireMessageReceived(
                                ctx, new DefaultHttpChunk(lastProduct), e.getRemoteAddress());
                    }

                    // Emit the last chunk.
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBuffer.readable()

        // Otherwise, all messages are encrypted.
        ChannelBuffer msg = (ChannelBuffer) e.getMessage();
        PendingWrite pendingWrite;

        if (msg.readable()) {
            pendingWrite = new PendingWrite(evt.getFuture(), msg.toByteBuffer(msg.readerIndex(), msg.readableBytes()));
        } else {
            pendingWrite = new PendingWrite(evt.getFuture(), null);
        }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBuffer.readable()

                if (res.isChunked()) {
                    readingChunks = true;
                } else {
                    ChannelBuffer content = res.getContent();
                    if (content.readable()) {
                        fireMessageReceived(HttpTunnelingClientSocketChannel.this, content);
                    }
                    // Reached to the end of response - close the request.
                    closeReal(succeededFuture(virtualChannel));
                }
View Full Code Here

Examples of com.peterhi.obsolete.Data.readable()

      assertEquals(0, data.debug_GetRead());
      boolean b = data.read2();
      assertEquals(1, data.debug_GetRead());
      assertEquals(true, a);
      assertEquals(true, b);
      assertEquals(7, data.readable());
      data.skip(7);
      assertEquals(0, data.readable());
    } finally {
    }
  }
View Full Code Here

Examples of com.peterhi.runtime.Buffer.readable()

      // 00[111111 1111]0000 ==> not aligned
     
      byte[] existingData = new byte[] { -1, -1 };
      Buffer existingDataOffsetLengthBitsNotAligned = new Buffer(existingData, 4, 10, false);
      assertEquals(2, existingDataOffsetLengthBitsNotAligned.size());
      assertEquals(14, existingDataOffsetLengthBitsNotAligned.readable());
      assertEquals(14, existingDataOffsetLengthBitsNotAligned.written());
      assertEquals(2, existingDataOffsetLengthBitsNotAligned.writable());
      assertEquals(0, existingDataOffsetLengthBitsNotAligned.read());
      existingDataOffsetLengthBitsNotAligned.skip(3);
      assertEquals(1, existingDataOffsetLengthBitsNotAligned.read());
View Full Code Here

Examples of io.netty.buffer.ChannelBuffer.readable()

        // Otherwise, all messages are encrypted.
        ChannelBuffer msg = (ChannelBuffer) e.getMessage();
        PendingWrite pendingWrite;

        if (msg.readable()) {
            pendingWrite = new PendingWrite(evt.getFuture(), msg.toByteBuffer(msg.readerIndex(), msg.readableBytes()));
        } else {
            pendingWrite = new PendingWrite(evt.getFuture(), null);
        }
        synchronized (pendingUnencryptedWrites) {
View Full Code Here

Examples of net.gleamynode.netty.buffer.ChannelBuffer.readable()

            ctx.sendUpstream(e);
            return;
        }

        ChannelBuffer input = (ChannelBuffer) m;
        if (!input.readable()) {
            return;
        }

        if (cumulation.readable()) {
            cumulation.discardReadBytes();
View Full Code Here

Examples of org.arch.buffer.Buffer.readable()

      }
      Buffer content = new Buffer(chunkLength);
      content.write(resBuffer, chunkLength);
      try
      {
        while (content.readable())
        {
          Event ev = EventDispatcher.getSingletonInstance().parse(
                  content);
          ev = Event.extractEvent(ev);
          EventHeader header = Event.getHeader(ev);
View Full Code Here

Examples of org.arch.buffer.Buffer.readable()

      while (!sendEventQueue[index].isEmpty())
      {
        sendEventQueue[index].removeFirst().encode(buffer);
      }
    }
    if (buffer.readable())
    {
      pusher[index].start(buffer);
    }
  }
}
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.