private static String from(InputStream is) throws IOException {
        if (is == null)
            return "";
        StringBuilder sb = new StringBuilder();
        try {
            BufferedReader reader = new BufferedReader(
                    new InputStreamReader(is, StringUtils.UTF8));
            String line;
            while ((line = reader.readLine()) != null) {
                sb.append(line);
            }
        } finally {
            is.close();
        }
        return sb.toString();
    }
Converts and return the underlying S3 object as a json string.

@throws SdkClientException if failed in JSON conversion.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/v2/S3ObjectWrapper.java