Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1898

Add convenience method for getting raw bytes from GetResult

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.2.5
    • None
    • None
    • None
    • 1

    Description

      If you want the raw bytes, you can do it today but you need to specify a transcoder that permits getting the content as a byte array, which is verbose. It would be nice if you could just say `contentAsBytes()` like you can with LookupInResult.

      Before:

      GetResult result = collection.get("foo", GetOptions.getOptions()
              .transcoder(RawJsonTranscoder.INSTANCE));
      byte[] contentBytes = result.contentAs(byte[].class);
      

      After:

      byte[] contentBytes = collection.get("foo").contentAsBytes();
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              david.nault David Nault
              david.nault David Nault
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty