Examples of slice()


Examples of org.jclouds.io.PayloadSlicer.slice()

      Blob blob = new BlobImpl(metadata);
      Payload payload = new StringPayload("ABCD");
      payload.setContentMetadata(contentMetadata);
      blob.setPayload(payload);

      expect(slicer.slice(payload, 0, MultipartUploadStrategy.MAX_BLOCK_SIZE)).andReturn(payload);
      expect(slicer.slice(payload, MultipartUploadStrategy.MAX_BLOCK_SIZE, MultipartUploadStrategy.MAX_BLOCK_SIZE)).andReturn(payload);
      expect(slicer.slice(payload, MultipartUploadStrategy.MAX_BLOCK_SIZE * 2, MultipartUploadStrategy.MAX_BLOCK_SIZE)).andReturn(payload);
      expect(slicer.slice(payload, MultipartUploadStrategy.MAX_BLOCK_SIZE * 3, oneMB)).andReturn(payload);
      client.putBlock(eq(container), eq(blobName), anyObject(String.class), eq(payload));
      expectLastCall().times(4);
View Full Code Here

Examples of org.msgpack.core.buffer.MessageBuffer.slice()

            cursor += copyLen;
        }

        // Replace the current buffer with the new buffer
        totalReadBytes += position;
        buffer = byteSizeToRead == newBuffer.size() ? newBuffer : newBuffer.slice(0, byteSizeToRead);
        position = 0;

        return true;
    }
View Full Code Here

Examples of reactor.io.Buffer.slice()

  @Test
  @Ignore
  public void clockManualDateExtraction() {
    final String[] months = new String[]{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
    final Buffer date = Buffer.wrap("Oct 11 22:14:15");
    final Iterable<Buffer.View> slices = date.slice(0, 3, 4, 6, 7, 9, 10, 12, 13);

    Consumer<Integer> test = new Consumer<Integer>() {
      Calendar cal = Calendar.getInstance();

      @Override
View Full Code Here

Examples of tkuri.uty.Bs.slice()

      int c = host.indexOf(':');
      if (c < 0) {
        port = 80;
      } else {
        port = (int) host.sub(c + 1).toLong();
        host = host.slice(0, c);
      }

    } else {
      host = Bs.valueOf("localhost");
      port = 80;
View Full Code Here

Examples of xerial.larray.LIntArray.slice()

        LIterator<?> f = l.filter(new AbstractFunction1<Object, Object>(){
            public Object apply(Object v1) {
                return Integer.class.cast(v1) % 2 == 0;
            }
        });
        LArray s = l.slice(2);

        // Build LArray
        LIntArrayBuilder b = new LIntArrayBuilder();
        for(int i=0; i<10; i += 3)
            b.append(i);
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.