code: public List<Bucket> listBuckets()
      throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException,
             InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
             InternalException {
      HttpResponse response = executeGet(null, null, null, null);
      ListAllMyBucketsResult result = new ListAllMyBucketsResult();
      result.parseXml(response.body().charStream());
      response.body().close();
      return result.buckets();
    }
docs: Returns all bucket information owned by the current user.
  
  </p><b>Example:</b><br>
  <pre>{@code List<Bucket> bucketList = minioClient.listBuckets();
  for (Bucket bucket : bucketList) {
  System.out.println(bucket.creationDate() + ", " + bucket.name());
  } }</pre>
  
  @return List of bucket type.
  
  @throws InvalidBucketNameException  upon invalid bucket name is given
  @throws NoSuchAlgorithmException
  upon requested algorithm was not found during signature calculation
  @throws InsufficientDataException   upon getting EOFException while reading given
  @throws IOException                 upon connection error
  @throws InvalidKeyException
  upon an invalid access key or secret key
  @throws NoResponseException         upon no response from server
  @throws XmlPullParserException      upon parsing response xml
  @throws ErrorResponseException      upon unsuccessful execution
  @throws InternalException           upon internal library error