}
private void handleBlobList(HttpServletRequest request,
HttpServletResponse response, String containerName)
throws IOException {
ListContainerOptions options = new ListContainerOptions();
String delimiter = request.getParameter("delimiter");
if (!(delimiter != null && delimiter.equals("/"))) {
options = options.recursive();
}
String prefix = request.getParameter("prefix");
if (prefix != null) {
options = options.inDirectory(prefix);
}
String marker = request.getParameter("marker");
if (marker != null) {
options = options.afterMarker(request.getParameter("marker"));
}
int maxKeys = 1000;
String maxKeysString = request.getParameter("max-keys");
if (maxKeysString != null) {
try {
maxKeys = Integer.parseInt(maxKeysString);
} catch (NumberFormatException nfe) {
sendSimpleErrorResponse(response, S3ErrorCode.INVALID_ARGUMENT);
return;
}
}
options = options.maxResults(maxKeys);
PageSet<? extends StorageMetadata> set;
try {
set = blobStore.list(containerName, options);
} catch (ContainerNotFoundException cnfe) {