code: public ObjectStat statObject(String bucketName, String objectName, ServerSideEncryption sse)
      throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException,
             InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
             InternalException, InvalidArgumentException {
      if ((sse.getType() == ServerSideEncryption.Type.SSE_S3)
          || (sse.getType() == ServerSideEncryption.Type.SSE_KMS)) {
        throw new InvalidArgumentException("Invalid encryption option specified for encryption type " + sse.getType());
      } else if ((sse.getType() == ServerSideEncryption.Type.SSE_C) && (!this.baseUrl.isHttps())) {
        throw new InvalidArgumentException("SSE_C operations must be performed over a secure connection.");
      }
      Map<String, String> headers = new HashMap<>();
      sse.marshal(headers);
      HttpResponse response = executeHead(bucketName, objectName, headers);
      ResponseHeader header = response.header();
      Map<String,List<String>> httpHeaders = response.httpHeaders();
      ObjectStat objectStat = new ObjectStat(bucketName, objectName, header, httpHeaders);
      return objectStat;
    }
docs: Returns meta data information of given object in given bucket.
  
  </p><b>Example:</b><br>
  <pre>{@code ObjectStat objectStat = minioClient.statObject("my-bucketname", "my-objectname", sse);
  System.out.println(objectStat); }</pre>
  
  @param bucketName Bucket name.
  @param objectName Object name in the bucket.
  @param sse        Encryption metadata only required for SSE-C.
  
  @return Populated object metadata.
  
  @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
  InputStream even before reading given length
  @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
  @throws InvalidArgumentException    upon invalid value is passed to a method.
  @see ObjectStat