Sitelet https://github.com/googleapis/google-cloud-java/issues/56
Skip to content

Is StorageService.load the right name? #56

Description

@jgeewax

Right now, to load a Blob into a byte array, we use the load method:

StorageService storage = ...;
bytes[] bytes = storage.load("bucket-name", "blob-name");

Is load the right verb for this? (Not saying it's wrong, just want to discuss this one here.)

Some of the options:

  • load (This is what it is today)
  • download
  • read
  • getBytes
  • readBytes

Activity

  1. added
    type: questionRequest for information or clarification. Not an issue.
    api: storageIssues related to the Cloud Storage API.
    on May 12, 2015
  2. added this to the milestone on May 12, 2015
  3. modified the milestones: , on Jun 1, 2015
  4. aozarov commented on Jun 1, 2015

    @aozarov
    Contributor

    @jgeewax , I don't think this belongs in this milestone as as I think the answer for this API questions would benefit from a wider set of opinions.

  5. jgeewax commented on Jun 2, 2015

    @jgeewax
    Author

    Can you clarify why? I think this belongs here because naming stuff is something relatively easy to discuss, and would make things a bit more stable once we have outsiders using the library.

    In short, I think it's worth having and resolving this discussion before a public announcement.

  6. aozarov commented on Jun 3, 2015

    @aozarov
    Contributor

    As you can see, this issue is open for 21 days with no further comments/suggestions.
    Clearly I liked "load" in this case (trying to make it clear that the complete content would be fetched and loaded into memory) and for that reason I names it as such.

    I don't like download (which to me is more associated with save-to-disk) but I can live with read (though to me that normally is associated with a range/chunk rather than the complete content). I don't mind to change it to read (or its variants) but would that really be better? This is why I think we should wait until announced, so we can get more opinions...

  7. jgeewax commented on Jun 3, 2015

    @jgeewax
    Author

    Recapping the options based on your feedback:

    • load: Seems clear about the action, it's putting stuff to memory
    • download: I can agree that this tends to me "put to disk" so I can understand that.
    • read: I could go either way on this, not entirely sure.
    • getBytes: Seems like a very clear method name... I kind of like this one
    • loadBytes wasn't on the list, but I like this too.

    I still don't know if we have enough to call this discussion "closed", would love to start crossing off the different options and getting a bit of feedback.

  8. jboynes commented on Jun 3, 2015

    @jboynes

    readAllBytes would be consistent with java.nio.Files

  9. aozarov commented on Jun 3, 2015

    @aozarov
    Contributor

    I am fine with readAllBytes. Pull request #89

  10. jboynes commented on Jun 3, 2015

    @jboynes

    Merged

  11. 16 remaining items

  12. added a commit that references this issue on Dec 22, 2025
    654af53
  13. added a commit that references this issue on Jan 22, 2026
  14. added a commit that references this issue on Feb 24, 2026
  15. added a commit that references this issue on Mar 11, 2026
    6396fc0
  16. added a commit that references this issue on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions