}
final FileContentLocator fileContentLocator = new FileContentLocator("text/xml");
try {
try (OutputStream buffer = fileContentLocator.getOutputStream();) {
final MXSerializer mx = new MXSerializer();
mx.setProperty("http://xmlpull.org/v1/doc/properties.html#serializer-indentation", " ");
mx.setProperty("http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n");
final String encoding = "UTF-8";
mx.setOutput(buffer, encoding);
mx.startDocument(encoding, null);
mirrorsByRepositoryDom.writeToSerializer(null, mx);
mx.flush();
}
final DefaultStorageFileItem result =
new DefaultStorageFileItem(this, new ResourceStoreRequest(PRIVATE_MIRRORS_PATH),
true /* isReadable */, false /* isWritable */, fileContentLocator);