0

I am trying to store and retrieve binary objects from swift using jclouds.openstack.swift API

Question: How to download objects using ranges.

For example:

          swiftApi = ContextBuilder.newBuilder(provider)
              .endpoint("....")
              .credentials(identity, credentials)
              .modules(modules)
              .buildApi(SwiftApi.class);

    final ObjectApi objectApi = 
               swiftApi.objectApiInRegionForContainer(REGION, CONTAINER);

    GetOptions getOptions = 
                     GetOptions.Builder.range(0,10).range(100, 200);

    SwiftObject obj = objectApi.get(OBJECT_NAME, getOptions);
            Payload payload = obj.getPayload();
            // ????? I expected a binary stream but i get something else
            payload2.openStream()

When i dump the stream as string i see headers and mime parts arriving but i don't understand how to access the data

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19
4d50
  • 45
  • 4

1 Answers1

0

jclouds 1.7.2 does not support this and I reported JCLOUDS-575 to track this issue.

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19