/** * Sets the optional <code>encodingType</code> parameter indicating the * encoding method to be applied on the response. An object key can contain * any Unicode character; however, XML 1.0 parser cannot parse some * characters, such as characters with an ASCII value from 0 to 10. For * characters that are not supported in XML 1.0, you can add this parameter * to request that Amazon S3 encode the keys in the response. * Returns this {@link ListObjectsRequest}, enabling additional method calls * to be chained together. * * @param encodingType * The encoding method to be applied on the response. Valid * values: null (not encoded) or "url". */ public ListObjectsRequest withEncodingType(String encodingType) { setEncodingType(encodingType); return this; }
private void prepareCurrentListing() { while (currentListing == null || (!currentIterator.hasNext() && currentListing.isTruncated())) { if (currentListing == null) { ListObjectsRequest req = new ListObjectsRequest(); req.setBucketName(getBucketName()); req.setPrefix(getPrefix()); req.setMaxKeys(getBatchSize()); req.setDelimiter(getDelimiter()); req.setMarker(getMarker()); req.setEncodingType(getEncodingType()); req.setRequesterPays(isRequesterPays()); currentListing = getS3().listObjects(req); } else { currentListing = getS3().listNextBatchOfObjects(currentListing); } currentIterator = currentListing.getObjectSummaries().iterator(); } }
/** * Sets the optional <code>encodingType</code> parameter indicating the * encoding method to be applied on the response. An object key can contain * any Unicode character; however, XML 1.0 parser cannot parse some * characters, such as characters with an ASCII value from 0 to 10. For * characters that are not supported in XML 1.0, you can add this parameter * to request that Amazon S3 encode the keys in the response. Returns this * {@link ListObjectsRequest}, enabling additional method calls to be * chained together. * * @param encodingType The encoding method to be applied on the response. * Valid values: null (not encoded) or "url". */ public ListObjectsRequest withEncodingType(String encodingType) { setEncodingType(encodingType); return this; }
/** * Sets the optional <code>encodingType</code> parameter indicating the * encoding method to be applied on the response. An object key can contain * any Unicode character; however, XML 1.0 parser cannot parse some * characters, such as characters with an ASCII value from 0 to 10. For * characters that are not supported in XML 1.0, you can add this parameter * to request that Amazon S3 encode the keys in the response. Returns this * {@link ListObjectsRequest}, enabling additional method calls to be * chained together. * * @param encodingType The encoding method to be applied on the response. * Valid values: null (not encoded) or "url". */ public ListObjectsRequest withEncodingType(String encodingType) { setEncodingType(encodingType); return this; }
/** * Sets the optional <code>encodingType</code> parameter indicating the * encoding method to be applied on the response. An object key can contain * any Unicode character; however, XML 1.0 parser cannot parse some * characters, such as characters with an ASCII value from 0 to 10. For * characters that are not supported in XML 1.0, you can add this parameter * to request that Amazon S3 encode the keys in the response. * Returns this {@link ListObjectsRequest}, enabling additional method calls * to be chained together. * * @param encodingType * The encoding method to be applied on the response. Valid * values: null (not encoded) or "url". */ public ListObjectsRequest withEncodingType(String encodingType) { setEncodingType(encodingType); return this; }
@Override public ObjectListing getObjectListing(ListObjectsRequest request) { com.amazonaws.services.s3.model.ListObjectsRequest mutable = new com.amazonaws.services.s3.model.ListObjectsRequest(); mutable.setBucketName(request.getBucket()); mutable.setDelimiter(request.getDelimiter().orNull()); mutable.setEncodingType(request.getEncoding().orNull()); mutable.setMarker(request.getMarker().orNull()); mutable.setMaxKeys(request.getMax()); mutable.setPrefix(request.getPrefix().orNull()); return copyOf(client.listObjects(mutable)); }