public boolean contains(String id) {
Misc.checkNotNullOrEmpty(id, "id");
URI doc = this.uriHelper.documentUri(id);
try {
HttpConnection connection = Http.HEAD(doc);
<BUG>this.executeToInputStreamWithRetry(connection);
return true;</BUG>
} catch (Exception e) {
return false;
}

public boolean contains(String id) {
Misc.checkNotNullOrEmpty(id, "id");
URI doc = this.uriHelper.documentUri(id);
try {
HttpConnection connection = Http.HEAD(doc);
this.executeWithRetry(connection, new NoOpInputStreamProcessor());
return true;
} catch (Exception e) {
return false;
