How to extract, in a list, all keys from a bucket

I want to view in a list all keys stored in a bucket, using Java.
Can anyone please help me create a java class that can do such thing?

Hi,

to do this, you want to create a view. The easiest one is like

function(doc, meta) {
emit(null, null);
}

From your client sdk, you query it and in the iterator you can access the document IDs through ViewRow.getId();