Examples of nioBuffer()


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

              break;
            case DATA_PAGE:
              valueReadSoFar += pageHeader.data_page_header.getNum_values();
              ByteBuf buf = allocator.buffer(pageHeader.compressed_page_size);
              lastPage = buf;
              ByteBuffer buffer = buf.nioBuffer(0, pageHeader.compressed_page_size);
              CompatibilityUtil.getBuf(in, buffer, pageHeader.compressed_page_size);
              return new Page(
                      decompressor.decompress(BytesInput.from(buffer, 0, pageHeader.compressed_page_size), pageHeader.getUncompressed_page_size()),
                      pageHeader.data_page_header.num_values,
                      pageHeader.uncompressed_page_size,
View Full Code Here

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


  @Override
  public ByteBuffer allocate(int sz) {
    ByteBuf bb = oContext.getAllocator().buffer(sz);
    ByteBuffer b = bb.nioBuffer(0, sz);
    allocatedBuffers.put(System.identityHashCode(b), bb);
    logger.debug("ParquetDirectByteBufferAllocator: Allocated "+sz+" bytes. Allocated ByteBuffer id: "+System.identityHashCode(b));
    return b;
  }
View Full Code Here

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

          - (index - adjustment));
      switch (s.nioBufferCount()) {
      case 0:
        throw new UnsupportedOperationException();
      case 1:
        buffers.add(s.nioBuffer(index - adjustment, localLength));
        break;
      default:
        Collections.addAll(buffers,
            s.nioBuffers(index - adjustment, localLength));
      }
View Full Code Here

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

        final int oldPos = packet.position();
        if (wantsInboundHeapBuffer && packet.isDirect()) {
            newPacket = ctx.alloc().heapBuffer(packet.limit() - oldPos);
            newPacket.writeBytes(packet);
            oldPacket = packet;
            packet = newPacket.nioBuffer();
        } else {
            oldPacket = null;
            newPacket = null;
        }
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.