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
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.5
    • 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

          For Gerrit Dashboard: JCBC-1898
          # Subject Branch Project Status CR V

          Activity

            There are no comments yet on this issue.

            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